Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在不影响原功能代码的情况下,增加了一些本机,VPS部署,或者docker构建的一些文件 #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

iouAkira
Copy link

@iouAkira iouAkira commented Sep 6, 2019

  • send-notification.js 这个文件主要根据repo 里面 ./utilities/send-mail.jscloud.js 里面提取出来改造成一个专门给crontab 做定时任务发送通知邮件用的。因为这个文件单独执行所以,没有原Comment表的更新权限,所以这里单独将发送通知记录到一张新的Notifications表。
  • ./routes/comment.js 这文件里面增加了 updateCommentByNotifications 方法,因为这里是管理员登录后台了,有权限更新Comment表了。为了不影响其他模块的,所以这里就会根据Notifications表的发送记录,把Comment表的isNotified更新为true

- send-notification.js 这个文件主要根据repo 里面 ./utilities/send-mail.js 和 cloud.js 里面提取出来改造成一个专门给crontab 做定时任务发送通知邮件用的。因为这个文件单独执行所以,没有原Comment表的更新权限,所以这里单独将发送通知记录到一张新的Notifications表。
- ./routes/comment.js 这文件里面增加了 updateCommentByNotifications 方法用,因为这里是管理员登录后台了,有权限更新Comment表了。为了不影响其他模块的,所以这里就会根据Notifications表的发送记录,把Comment表的isNotified更新为true。
@iouAkira iouAkira closed this Sep 6, 2019
@DesertsP DesertsP reopened this Sep 7, 2019
@DesertsP
Copy link
Owner

DesertsP commented Sep 7, 2019

思路不错

@iouAkira
Copy link
Author

iouAkira commented Sep 9, 2019

思路不错

@DesertsP 本来想合进去的,感觉好像没什么人有这个需求,我不会Nodejs也是模仿着改的,代码写的也不行,所以提了PR又关了😂,如果有人有这个需求你可以考虑合进去。

@KimYangOfCat
Copy link

@iouAkira 太赞了,我刚好想把它封装成 Docker 镜像,没想到你已经做了,赞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants