Created
January 18, 2017 19:06
-
-
Save ChuckJHardy/4c2363765249d7f6712fbe852f8c4d72 to your computer and use it in GitHub Desktop.
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
# frozen_string_literal: true | |
require "clockwork" | |
require "./config/environment" | |
module Clockwork | |
handler { |job, time| puts "-> Running #{job}, at #{time}" } | |
# Clockwork.every(1.minute, "pipes.crime_events.refresh") do # For manual testing | |
Clockwork.every(1.day, "pipes.crime_events.refresh", if: ->(t) { t.day == 1 }) do | |
AutomatedFeedback::CWE.perform | |
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
# Queue / Workers | |
gem "sidekiq" | |
gem "sidekiq-statistic" | |
gem "sidekiq-failures" | |
gem "clockwork", git: "https://github.com/Rykian/clockwork.git" |
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
web: bundle exec passenger start -p $PORT --max-pool-size 3 | |
sidekiq: bundle exec sidekiq -c 5 -v | |
clock: bundle exec clockwork config/clock.rb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment