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

RunNowTask仅返回bool值,如何确认失败原因? #34

Open
gruiyuan opened this issue Jun 26, 2024 · 4 comments
Open

RunNowTask仅返回bool值,如何确认失败原因? #34

gruiyuan opened this issue Jun 26, 2024 · 4 comments

Comments

@gruiyuan
Copy link

hi,
目前已知同一个task还没执行完毕,RunNowTask会返回false. 但是如何确认失败原因是不是由于task正在运行的缘故

@2881099

@2881099
Copy link
Owner

2881099 commented Jun 26, 2024

true 的情况,再看 log

@gruiyuan
Copy link
Author

true 的情况,再看 log

不太理解,求说明

@gruiyuan
Copy link
Author

我自己的实现方式是,增加一个表标记task的Excuting状态。在OnExecuting和OnExecuted的hook中增加这个字段值的设置

这样可以用来查询是否正在执行

@2881099
Copy link
Owner

2881099 commented Jun 26, 2024

TaskLog 在 OnExecuted 事件中,或者查询数据库

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

No branches or pull requests

2 participants