Skip to content

Instantly share code, notes, and snippets.

@ChuckJHardy
Created January 18, 2017 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChuckJHardy/4c2363765249d7f6712fbe852f8c4d72 to your computer and use it in GitHub Desktop.
Save ChuckJHardy/4c2363765249d7f6712fbe852f8c4d72 to your computer and use it in GitHub Desktop.
# 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
# Queue / Workers
gem "sidekiq"
gem "sidekiq-statistic"
gem "sidekiq-failures"
gem "clockwork", git: "https://github.com/Rykian/clockwork.git"
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