-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #322 from zooniverse/replace-sidetiq-with-sidekiq-…
…cron Replace Sidetiq with Sidekiq-cron
- Loading branch information
Showing
16 changed files
with
134 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
/log/*.log | ||
/tmp | ||
/config/*.yml | ||
!/config/schedule.yml | ||
/.rvmrc | ||
/coverage | ||
**.orig | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
class DailyDigestEmailWorker | ||
include DigestEmailWorker | ||
self.frequency = :daily | ||
|
||
recurrence do | ||
daily.hour_of_day 6 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
class WeeklyDigestEmailWorker | ||
include DigestEmailWorker | ||
self.frequency = :weekly | ||
|
||
recurrence do | ||
weekly.day(:monday).hour_of_day 12 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
require 'sidekiq/web' | ||
require 'sidekiq/cron/web' | ||
|
||
Rails.application.routes.draw do | ||
defaults format: 'json' do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Here is a list of jobs that are scheduled to run periodically. | ||
# We use a UNIX cron notation to specify execution schedule. | ||
# | ||
# Please read here for more information: | ||
# https://github.com/ondrejbartas/sidekiq-cron#adding-cron-job | ||
|
||
announcement_expiry_worker: | ||
cron: "0 * * * *" | ||
class: "AnnouncementExpiryWorker" | ||
queue: "default" | ||
description: "Hourly worker that destroys all expired Announcements. Announcements expires_at set to 1 month from creation" | ||
daily_digest_email_worker: | ||
cron: "0 6 * * *" | ||
class: "DailyDigestEmailWorker" | ||
queue: "default" | ||
description: "Daily worker that sends notifications to users who have a Daily Subscription Preference. Runs at 6th hour of the day." | ||
data_request_expiry_worker: | ||
cron: "0 * * * *" | ||
class: "DataRequestExpiryWorker" | ||
queue: "default" | ||
description: "Hourly worker that destroys all expired Data Requests. Data Request expires_at is set to 1 day from request creation." | ||
notification_expiry_worker: | ||
cron: "0 * * * *" | ||
class: "NotificationExpiryWorker" | ||
queue: "default" | ||
description: "Hourly worker that destroys all expired Notifications. Notifications expires in 3 months of creation" | ||
unsubscribe_token_expiry_worker: | ||
cron: "0 * * * *" | ||
class: "UnsubscribeTokenExpiryWorker" | ||
queue: "default" | ||
description: "Hourly worker that destroys all unsubscribe_tokens. Unsubscribe_token expires_at set to 1 month of creation" | ||
weekly_digest_expiry_worker: | ||
cron: "0 12 * * 1" | ||
class: "WeeklyDigestEmailWorker" | ||
queue: "default" | ||
description: "Weekly worker that sends notifications to users who have a subscription preference set to weekly. Runs on Mondays on the 12th hour of the day." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.