The chain of scheduled ingestion jobs would break if one job fails before this point. The finally safeguards against many sources of failure, but if a worker is restarted during job handling before reaching this point, that is problematic.
I'm flagging this as a potential follow-up to move to rq.cron.CronScheduler, which will require a dedicated rq-cron-scheduler service in docker-compose.yml running something like:
from rq.cron import CronScheduler
cron = CronScheduler(connection=app.redis_connection)
cron.start()
And then registering recurring jobs with something like:
cron.register(
self._execute,
queue_name=app.queues[FETCH_EVENTS_QUEUE_NAME],
cron_string="0 0 * * *",
kwargs={"ven_id": ven_client.id, "config_name": sensor_config.name},
)
Originally posted by @Flix6x in #1 (comment)
The chain of scheduled ingestion jobs would break if one job fails before this point. The
finallysafeguards against many sources of failure, but if a worker is restarted during job handling before reaching this point, that is problematic.I'm flagging this as a potential follow-up to move to
rq.cron.CronScheduler, which will require a dedicated rq-cron-scheduler service indocker-compose.ymlrunning something like:And then registering recurring jobs with something like:
Originally posted by @Flix6x in #1 (comment)