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

修复任务执行超时后不向调度中心返回超时的bug #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

angel-of-java
Copy link

原先任务是同步执行的,因此在调度器设置任务超时时间之后,任务即使超时也依然会照常执行,并且正常返回结果且不会触发超时重试。此次修改之后,任务在超时的时候,会回调调度器返回任务超时,如果任务正常结束,则正常返回。
因为go无法强制kill协程,只能协程自己退出。因此虽然任务超时并且回调调度器,但是此任务仍然会执行完毕,不会中止,因此如果有超时重试机制,则可能会同时执行两个相同的任务。

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.

1 participant