我增加了一个选项,可以选择同步发送邮件还是不同步。#6
Merged
Merged
Conversation
Owner
|
其实我觉得, 可以不用复用, 如果 同步的话, 在Plugin::parseComment 中可以直接判断下 加一句 类似 file_get_content('https://example.com/action/comment-to-mail/?xxxxxx')直接 请求自己, 貌似不会这么乱. 目前的话 即使同步 好像也会写入数据库, 可以同时处理下 |
Contributor
Author
因为我不懂PHP,所以自己瞎摸索着写的。。。在我接触的其他语言中,请求网址都挺麻烦的。我后面看看再改改。 目前我这里写入数据库是在判断之后,所以同步模式的话应该就不会写入数据库吧? |
Contributor
Author
|
重新改了一下,现在我这里可以用了。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
我在其他设置里面增加了一个是否同步发送邮件的选项,如果勾选就是同步发送模式。
同时由于搞不懂Action的逻辑,所以尝试了好久都不能复用里面的代码,只能自己重新开了一个SyncMail用来执行同步发送邮件的任务。