Skip to content

我增加了一个选项,可以选择同步发送邮件还是不同步。#6

Merged
soxft merged 7 commits into
soxft:mainfrom
buzhangjiuzhou:main
Apr 4, 2022
Merged

我增加了一个选项,可以选择同步发送邮件还是不同步。#6
soxft merged 7 commits into
soxft:mainfrom
buzhangjiuzhou:main

Conversation

@buzhangjiuzhou
Copy link
Copy Markdown
Contributor

我在其他设置里面增加了一个是否同步发送邮件的选项,如果勾选就是同步发送模式。

同时由于搞不懂Action的逻辑,所以尝试了好久都不能复用里面的代码,只能自己重新开了一个SyncMail用来执行同步发送邮件的任务。

@soxft
Copy link
Copy Markdown
Owner

soxft commented Apr 3, 2022

其实我觉得, 可以不用复用, 如果 同步的话, 在Plugin::parseComment 中可以直接判断下 加一句 类似

file_get_content('https://example.com/action/comment-to-mail/?xxxxxx')

直接 请求自己, 貌似不会这么乱.

目前的话 即使同步 好像也会写入数据库, 可以同时处理下

@buzhangjiuzhou
Copy link
Copy Markdown
Contributor Author

其实我觉得, 可以不用复用, 如果 同步的话, 在Plugin::parseComment 中可以直接判断下 加一句 类似

file_get_content('https://example.com/action/comment-to-mail/?xxxxxx')

直接 请求自己, 貌似不会这么乱.

目前的话 即使同步 好像也会写入数据库, 可以同时处理下

因为我不懂PHP,所以自己瞎摸索着写的。。。在我接触的其他语言中,请求网址都挺麻烦的。我后面看看再改改。

目前我这里写入数据库是在判断之后,所以同步模式的话应该就不会写入数据库吧?

@buzhangjiuzhou
Copy link
Copy Markdown
Contributor Author

重新改了一下,现在我这里可以用了。

@soxft soxft merged commit ca76551 into soxft:main Apr 4, 2022
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.

2 participants