mirror of
https://github.com/discourse/discourse.git
synced 2025-02-22 18:15:26 +08:00
reduce sidetiq frequency
remove minutely() schedule that was very inefficient
This commit is contained in:
parent
b730b27c4f
commit
d3c5afbb80
@ -5,6 +5,11 @@ Sidekiq.configure_server do |config|
|
|||||||
Sidetiq::Clock.start!
|
Sidetiq::Clock.start!
|
||||||
end
|
end
|
||||||
|
|
||||||
Sidekiq.configure_client { |config| config.redis = sidekiq_redis }
|
Sidetiq.configure do |config|
|
||||||
|
# we only check for new jobs once every 5 seconds
|
||||||
|
# to cut down on cpu cost
|
||||||
|
config.resolution = 5
|
||||||
|
end
|
||||||
|
|
||||||
|
Sidekiq.configure_client { |config| config.redis = sidekiq_redis }
|
||||||
Sidekiq.logger.level = Logger::WARN
|
Sidekiq.logger.level = Logger::WARN
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
module Jobs
|
module Jobs
|
||||||
class DashboardStats < Jobs::Scheduled
|
class DashboardStats < Jobs::Scheduled
|
||||||
recurrence { minutely(AdminDashboardData.recalculate_interval.minutes) }
|
recurrence { hourly.minute_of_hour(0,30) }
|
||||||
|
|
||||||
def execute(args)
|
def execute(args)
|
||||||
stats_json = AdminDashboardData.fetch_stats.as_json
|
stats_json = AdminDashboardData.fetch_stats.as_json
|
||||||
|
Loading…
x
Reference in New Issue
Block a user