villebro commented on code in PR #32511:
URL: https://github.com/apache/superset/pull/32511#discussion_r1981968119
##########
superset/tasks/scheduler.py:
##########
@@ -123,13 +124,20 @@ def prune_log() -> None:
@celery_app.task(name="prune_query")
-def prune_query() -> None:
+def prune_query(retention_period_days: Optional[int] = None) -> None:
stats_logger: BaseStatsLogger = app.config["STATS_LOGGER"]
stats_logger.incr("prune_query")
+ if retention_period_days is None:
+ retention_period_days = prune_query.request.properties.get(
+ "retention_period_days"
+ )
+ logger.warning(
+ "Your `prune_query` beat schedule uses `options` to pass the
retention "
+ "period, please use `kwargs` instead."
+ )
Review Comment:
I think we should deprecate this and remove support for `options` based
retention periods in 6.0. Can we add a comment along the lines of
```python
# TODO: Deprecated: Remove support for passing retention period via options
in 6.0
```
--
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]