mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 12:40:40 +08:00
FIX: Ensure that scheduled jobs are loaded. (#8183)
In development, the scheduled jobs are loaded lazily and MiniScheduler cannot discover them (/sidekiq/scheduler does not show any jobs).
This commit is contained in:
parent
519fe290e3
commit
5b84307774
|
@ -1,5 +1,13 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# Ensure that scheduled jobs are loaded before mini_scheduler is configured.
|
||||||
|
if Rails.env == "development"
|
||||||
|
require "jobs/base"
|
||||||
|
Dir.glob("#{Rails.root}/app/jobs/scheduled/*.rb") do |f|
|
||||||
|
load(f)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
require "sidekiq/pausable"
|
require "sidekiq/pausable"
|
||||||
|
|
||||||
Sidekiq.configure_client do |config|
|
Sidekiq.configure_client do |config|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user