From f474c0b6a5b45a87b7f4cbb4e7036443c2234291 Mon Sep 17 00:00:00 2001 From: Vincent Pochet Date: Tue, 26 Nov 2024 14:29:08 +0100 Subject: [PATCH] Add recurring task --- config/queue.yml | 3 +++ config/recurring.yml | 28 ++++++++++++++++++---------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/config/queue.yml b/config/queue.yml index d566bce5537..6d96c95dff4 100644 --- a/config/queue.yml +++ b/config/queue.yml @@ -18,5 +18,8 @@ development: test: <<: *default +staging: + <<: *default + production: <<: *default diff --git a/config/recurring.yml b/config/recurring.yml index d045b191477..77dcf557b62 100644 --- a/config/recurring.yml +++ b/config/recurring.yml @@ -1,10 +1,18 @@ -# production: -# 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 +default: &default + activate_subscriptions: + class: Clock::ActivateSubscriptionsJob + queue: clock + args: [{ sentry: { slug: "lago_activate_subscriptions", cron: "*/5 * * * *" } }] + schedule: every 5 miniutes + +development: + <<: *default + +test: + <<: *default + +staging: + <<: *default + +production: + <<: *default