adding retries to delete task to handle info service being down#215
adding retries to delete task to handle info service being down#215
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| bind=True, | ||
| acks_late=True, | ||
| autoretry_for=(Exception,), | ||
| max_retries=3) |
There was a problem hiding this comment.
Missing self parameter for bound Celery task
High Severity
The bind=True option was added to the Celery task decorator, but the function signature is missing the required self parameter as the first argument. When Celery invokes this task, it will pass the task instance as the first positional argument, which will be incorrectly assigned to delete_threshold. This causes delete_threshold to receive a task object instead of an integer, leading to a TypeError when comparing len(databases) > delete_threshold at runtime. The task will fail on every invocation and retry 3 times with the same error.
Note
Improves resilience of periodic database cleanup.
workflow:remove_expired_databasestobind=True,acks_late=True,autoretry_for=(Exception,),max_retries=3for automatic retries and safer failure handlingWritten by Cursor Bugbot for commit 42eb697. This will update automatically on new commits. Configure here.