Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp recurring tasks configuration and management #338

Merged
merged 11 commits into from
Sep 11, 2024

Commits on Sep 9, 2024

  1. Configuration menu
    Copy the full SHA
    d7955da View commit details
    Browse the repository at this point in the history
  2. Separate recurring tasks configuration into their own file

    `config/recurring.yml`. Run them using the least busy dispatcher
    (largest polling interval) or a new default dispatcher if none.
    
    This also introduces some new options for the CLI, to allow for
    `--dispatch_only` and `--work_only`, and to skip recurring tasks.
    rosa committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    0aa1644 View commit details
    Browse the repository at this point in the history
  3. Allow configuring queue and priority for recurring tasks

    And also setting a description that we can use from Mission Control in
    the future.
    rosa committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    03334b1 View commit details
    Browse the repository at this point in the history
  4. Split recurring scheduling responsibilities into another process

    A Scheduler, instead of Dispatcher, that will be created only when there
    are recurring tasks to run.
    rosa committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    a4467db View commit details
    Browse the repository at this point in the history
  5. Fix enqueuing recurring task with job outside Solid Queue

    Calling `set` on the job class returns a `ConfiguredJob`, and calling
    `perform_later` on a `ConfiguredJob` doesn't yield the job to a block
    passed as parameter, so we can't check if the enqueuing was successful
    or not. To work around this, the only way is to instantiate the job
    ourselves with the arguments, then call `enqueue` on that, and rely on
    the result, which would be what `job_class.perform_later` would yield
    to the block.
    rosa committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    5d7c949 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    de2eca8 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3c94a36 View commit details
    Browse the repository at this point in the history
  8. Use queue to specify the queue for a recurring task in configuration

    To match worker's `queues` configuration.
    rosa committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    8d47ed4 View commit details
    Browse the repository at this point in the history
  9. Allow specifying recurring tasks just with a "command"

    No need to have a class, can specify this using just a command for which
    we'd provide a default RecurringtJob class that will just eval the command.
    rosa committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    90f63c8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    8df600d View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2024

  1. Remove unused CLI argument

    rosa committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    2e53a64 View commit details
    Browse the repository at this point in the history