bito-code-review[bot] commented on code in PR #41075:
URL: https://github.com/apache/superset/pull/41075#discussion_r3561275676
##########
superset/config.py:
##########
@@ -1646,6 +1658,13 @@ class CeleryConfig: # pylint:
disable=too-few-public-methods
"task": "reports.prune_log",
"schedule": crontab(minute=0, hour=0),
},
+ # Entity version-history retention. Daily at 03:00; the task
+ # itself short-circuits when SUPERSET_VERSION_HISTORY_RETENTION_DAYS
+ # is 0 (disabled).
+ "version_history.prune_old_versions": {
+ "task": "version_history.prune_old_versions",
+ "schedule": crontab(minute=0, hour=3),
+ },
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Missing Celery task module import</b></div>
<div id="fix">
`version_history.prune_old_versions` is registered in `beat_schedule` (line
1664) but its module is absent from `CeleryConfig.imports` (line 1636-1642).
Without the module in `imports`, the Celery worker never discovers and
registers the task — when the beat fires at 03:00 the task is unknown and the
job silently fails. Add `"superset.tasks.version_history_retention"` to the
imports tuple.
</div>
</div>
<small><i>Code Review Run #a4b5a0</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]