Skip to content

Move to rq.cron.CronScheduler #3

Description

@Flix6x

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions