-
Notifications
You must be signed in to change notification settings - Fork 438
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
Question: Usage of django celery.backend_cleanup #213
Comments
The backend cleanup is resposible for deleting task results after a specified expiration and runs nightly at 4 AM (by default). See http://docs.celeryproject.org/en/latest/userguide/configuration.html#result-expires and https://github.com/celery/django-celery-results/blob/882aea93ee783537bcc409312a093f4207ef5da4/django_celery_results/backends/database.py#L66 (assuming you're using
It keeps the results backend from storing the result of every task that has ever been run, you should keep it around :-) ...now back to the important question
I have no idea why that's the case and I'd love to hear from others what debugging strategies they use when tasks aren't running as expected. I've had moderate success with digging into the scheduling database to look for inconsistencies and ultimately have pinned both celery and django-celery-beat at earlier versions due to issues with tasks running inconsistently. |
Hi @bradshjg Thanks for taking a look into the question,
Problem is even after changing the value from admin panel of
How do I change this default value to specific value? |
In the image you have above (and it's the default), the schedule for Given the above can you elaborate on what you mean by "it keeps changes to 4 hours interval which is default value after a couple of minutes."? |
You are right @bradshjg Thanks for contributing to the issue, I manage to solve it, it was due to some other reason related to |
@arbazkiraak I'd love to know what was the problem and how you managed to solve it. I'm facing the exact same thing. Some tasks simply never dispatch (all with the same interval). |
how did you solve the issue? @arbazkiraak |
I have the same problem. How do I fix it? |
There is not much documentation available for the actual usage of
django celery.backend_cleanup
Let's assume i have following
4 tasks scheduled with different interval
Checking DatabaseScheduler Logs I had found that only
Task1
is executing on interval.Q1) why other
TASKS
which are at different intervals such as24,8,10
Hours are not executing? , I'm Assuming this is becauseCrontab of celery.backend_cleanup
is set to every4 Hours
which is cleaning up queue tasks. Should i keep the large interval time forcelery.backend_cleanup
task ?Q2) Why we should keep
celery.backend_cleanup
task? Does it loads new tasks on every cleanup?The text was updated successfully, but these errors were encountered: