From a91b0e2c22febcb4881f7f1fd1fb71c9d1583c8d Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Thu, 12 Sep 2024 01:09:54 +0200 Subject: [PATCH] Migrate to Solid Queue 0.9.x and split config files With Solid Queue 0.9.0, the configuration is split into two files (`queue.yml` and `recurring.yml`) --- Gemfile.lock | 2 +- config/{solid_queue.yml => queue.yml} | 7 ------- config/recurring.yml | 12 ++++++++++++ 3 files changed, 13 insertions(+), 8 deletions(-) rename config/{solid_queue.yml => queue.yml} (62%) create mode 100644 config/recurring.yml diff --git a/Gemfile.lock b/Gemfile.lock index 7358df04c..258681667 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -534,7 +534,7 @@ GEM rexml (~> 3.2) rubocop (>= 1.0, < 2.0) slim (>= 3.0, < 6.0) - solid_queue (0.8.2) + solid_queue (0.9.0) activejob (>= 7.1) activerecord (>= 7.1) concurrent-ruby (>= 1.3.1) diff --git a/config/solid_queue.yml b/config/queue.yml similarity index 62% rename from config/solid_queue.yml rename to config/queue.yml index 28f7a9ace..9eace59c4 100644 --- a/config/solid_queue.yml +++ b/config/queue.yml @@ -16,10 +16,3 @@ test: production: <<: *default - dispatchers: - - polling_interval: 1 - batch_size: 500 - recurring_tasks: - nbp_sync_all_job: - class: NbpSyncAllJob - schedule: "0 3 * * *" diff --git a/config/recurring.yml b/config/recurring.yml new file mode 100644 index 000000000..dced05bc5 --- /dev/null +++ b/config/recurring.yml @@ -0,0 +1,12 @@ +# periodic_cleanup: +# class: CleanSoftDeletedRecordsJob +# queue: background +# args: [ 1000, { batch_size: 500 } ] +# schedule: every hour +# periodic_command: +# command: "SoftDeletedRecord.due.delete_all" +# priority: 2 +# schedule: at 5am every day +nbp_sync_all_job: + class: NbpSyncAllJob + schedule: at 3am every day