From 4ba5e678d8136400eb0f800a2b601865c4a585b0 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 6 Oct 2017 11:39:00 +0800 Subject: [PATCH] Require dependencies to enable live reload in dev for Sidekiq. --- app/jobs/onceoff/fix_primary_emails_for_staged_users.rb | 2 ++ app/jobs/regular/crawl_topic_link.rb | 1 + app/jobs/regular/notify_mailing_list_subscribers.rb | 2 ++ app/jobs/scheduled/dashboard_stats.rb | 4 ++++ lib/discourse_hub.rb | 1 + plugins/discourse-narrative-bot/jobs/narrative_init.rb | 3 +++ 6 files changed, 13 insertions(+) diff --git a/app/jobs/onceoff/fix_primary_emails_for_staged_users.rb b/app/jobs/onceoff/fix_primary_emails_for_staged_users.rb index 15fe43a14bb..36a55c64d56 100644 --- a/app/jobs/onceoff/fix_primary_emails_for_staged_users.rb +++ b/app/jobs/onceoff/fix_primary_emails_for_staged_users.rb @@ -1,3 +1,5 @@ +require_dependency 'user_destroyer' + module Jobs class FixPrimaryEmailsForStagedUsers < Jobs::Onceoff def execute_onceoff(args) diff --git a/app/jobs/regular/crawl_topic_link.rb b/app/jobs/regular/crawl_topic_link.rb index b5077aff854..15c0c01ad09 100644 --- a/app/jobs/regular/crawl_topic_link.rb +++ b/app/jobs/regular/crawl_topic_link.rb @@ -2,6 +2,7 @@ require 'open-uri' require 'nokogiri' require 'excon' require_dependency 'retrieve_title' +require_dependency 'topic_link' module Jobs class CrawlTopicLink < Jobs::Base diff --git a/app/jobs/regular/notify_mailing_list_subscribers.rb b/app/jobs/regular/notify_mailing_list_subscribers.rb index 6b8647a36bc..015cb65fdcf 100644 --- a/app/jobs/regular/notify_mailing_list_subscribers.rb +++ b/app/jobs/regular/notify_mailing_list_subscribers.rb @@ -1,3 +1,5 @@ +require_dependency 'post' + module Jobs class NotifyMailingListSubscribers < Jobs::Base diff --git a/app/jobs/scheduled/dashboard_stats.rb b/app/jobs/scheduled/dashboard_stats.rb index 75977e7acbd..9556bd7ea1a 100644 --- a/app/jobs/scheduled/dashboard_stats.rb +++ b/app/jobs/scheduled/dashboard_stats.rb @@ -1,3 +1,7 @@ +require_dependency 'admin_dashboard_data' +require_dependency 'group' +require_dependency 'group_message' + module Jobs class DashboardStats < Jobs::Scheduled every 30.minutes diff --git a/lib/discourse_hub.rb b/lib/discourse_hub.rb index 940800be17c..3ed120aaa90 100644 --- a/lib/discourse_hub.rb +++ b/lib/discourse_hub.rb @@ -1,4 +1,5 @@ require_dependency 'version' +require_dependency 'site_setting' module DiscourseHub diff --git a/plugins/discourse-narrative-bot/jobs/narrative_init.rb b/plugins/discourse-narrative-bot/jobs/narrative_init.rb index e2e9219bee3..68fb003f112 100644 --- a/plugins/discourse-narrative-bot/jobs/narrative_init.rb +++ b/plugins/discourse-narrative-bot/jobs/narrative_init.rb @@ -1,3 +1,6 @@ +require_dependency 'i18n' +require_dependency 'user' + module Jobs class NarrativeInit < Jobs::Base sidekiq_options queue: 'critical'