You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "piyushdatazip (via GitHub)" <gi...@apache.org> on 2023/11/28 10:03:08 UTC

Re: [PR] fix: Improve the reliability of alerts & reports [superset]

piyushdatazip commented on code in PR #25239:
URL: https://github.com/apache/superset/pull/25239#discussion_r1407511101


##########
superset/tasks/scheduler.py:
##########
@@ -47,9 +48,15 @@ def scheduler() -> None:
         return
     with session_scope(nullpool=True) as session:
         active_schedules = ReportScheduleDAO.find_active(session)
+        triggered_at = (
+            datetime.fromisoformat(scheduler.request.expires)
+            - app.config["CELERY_BEAT_SCHEDULER_EXPIRES"]

Review Comment:
   Hi I've been checking this code, how is this solving the issue, it select `datetime.utcnow()` because `datetime.fromisoformat(scheduler.request.expires) - app.config["CELERY_BEAT_SCHEDULER_EXPIRES"] = 0`
   Can you help me understand @jfrag1 ??



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org