-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Job killed mid running not gracefully causes infinite loop #37
Comments
I reverted the change in #32. |
Please provide the full stack trace of the error you are getting |
@cunla which error? |
This does not make sense, can you point me to where |
and you are getting http500, if you activate debug mode, you should get a stacktrace. |
In Sentry it says On of the many Stacktrace's I see in Opensearch
|
You can see in the above stacktrace:
|
fixed on 1.2.1 |
This change might have fixed one issue but its caused a bigger issue.
The jobs now run with an interval of 1 second regardless of whether they are enabled or not and ignores the interval defined in the job. Screenshot above shows the job is scheduled to run every hour. Screenshot above shows the job is running every second I believe the issues is in the @cunla reopen this issue or create a new one? |
you can create a new one. if you can write a test to replicate this it would help fix it. |
Describe the bug
A worker is killed mid running a job and the shutdown is not graceful. After this happens you get a 500 error accessing
admin/scheduler/queue/
and one ofadmin/scheduler/{repeatablejob/cronjob/scheduledjob}/
depending on what type of job was killed when running. The exceptions areand
Job repeatable_jobs:{jobname}:{jobid}: error while executing failure callback
This error is due to this change. The
self.rqueue.started_job_registry.get_job_ids()
callscleanup
which callsis_scheduled
thus an infinite loop.To Reproduce
Steps to reproduce the behavior:
admin/scheduler/queue/
) kill the worker process (for example bypkill -9 python
)clean_registries
function from a python django shellExpected behavior
The job gets -
Moved to FailedJobRegistry, due to AbandonedJobError
. This happens to the job if you revert back to version 1.0.2 but then you have this issue again.Implementation idea
is_scheduled
function when runningself.rqueue.started_job_registry.get_job_ids()
have an option to not run the cleanup inside ofget_job_ids
. You shouldn't need to run the cleanup from the is_scheduled method.self.rqueue.started_job_registry.get_job_ids()
remove theThe text was updated successfully, but these errors were encountered: