-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/392 cron check task #27
base: main
Are you sure you want to change the base?
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #27 +/- ##
==========================================
+ Coverage 97.01% 97.07% +0.05%
==========================================
Files 59 60 +1
Lines 3019 3076 +57
==========================================
+ Hits 2929 2986 +57
Misses 90 90 ☔ View full report in Codecov by Sentry. |
@zamuzakki could you check this answer in SO thread? He explains very well about the state of a task in Celery. We need to ensure that we don't stop a task which running time is more than 2H, so can we check the 'running' state from AsyncResult before stopping the job? I also want to explain the 'PENDING' and 'QUEUED' in our task status enum:
You can do a testing by making a long task, then trigger that task to run 10-20 times to the 'cplus' queue. There will be some tasks with QUEUED status and other tasks with PENDING status. In the future we should also handle the QUEUED tasks that have been lost, but it's kind of difficult right now because the AsyncResult will return the task state as pending. One possible way is to check against the queue (reserved tasks) in the worker. |
This is PR for ConservationInternational/cplus-plugin#392