discourse/config/clock.rb

22 lines
584 B
Ruby
Raw Normal View History

2013-02-06 03:16:51 +08:00
require 'clockwork'
require_relative 'boot'
require_relative 'environment'
2013-02-26 00:42:20 +08:00
# These are jobs you should run on a regular basis to make your
2013-02-06 03:16:51 +08:00
# forum work properly.
module Clockwork
handler do |job|
Jobs.enqueue(job, all_sites: true)
end
every(1.day, 'enqueue_digest_emails', at: '06:00')
every(1.day, 'category_stats', at: '04:00')
every(10.minutes, 'calculate_avg_time')
every(10.minutes, 'feature_topics')
every(1.minute, 'calculate_score')
every(20.minutes, 'calculate_view_counts')
every(1.day, 'version_check')
every(1.minute, 'clockwork_heartbeat')
2013-02-06 03:16:51 +08:00
end