mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:11:08 +08:00
DEV: Allow with_service
in jobs
This patch introduces a new `ServiceJob` class allowing the use of `with_service` in jobs. This way, it’s easier to use the chat service objects in jobs and provides the same level of functionality than the one we have in controllers.
This commit is contained in:

committed by
Loïc Guitaut

parent
925a7bd48b
commit
b8762172e4
@ -200,7 +200,7 @@ after_initialize do
|
||||
load File.expand_path("../lib/slack_compatibility.rb", __FILE__)
|
||||
load File.expand_path("../lib/post_notification_handler.rb", __FILE__)
|
||||
load File.expand_path("../lib/secure_uploads_compatibility.rb", __FILE__)
|
||||
load File.expand_path("../lib/endpoint.rb", __FILE__)
|
||||
load File.expand_path("../lib/service_runner.rb", __FILE__)
|
||||
load File.expand_path("../lib/steps_inspector.rb", __FILE__)
|
||||
load File.expand_path("../app/jobs/regular/auto_manage_channel_memberships.rb", __FILE__)
|
||||
load File.expand_path("../app/jobs/regular/auto_join_channel_batch.rb", __FILE__)
|
||||
@ -217,6 +217,7 @@ after_initialize do
|
||||
load File.expand_path("../app/jobs/scheduled/email_chat_notifications.rb", __FILE__)
|
||||
load File.expand_path("../app/jobs/scheduled/auto_join_users.rb", __FILE__)
|
||||
load File.expand_path("../app/jobs/scheduled/chat_periodical_updates.rb", __FILE__)
|
||||
load File.expand_path("../app/jobs/service_job.rb", __FILE__)
|
||||
load File.expand_path("../app/services/chat_publisher.rb", __FILE__)
|
||||
load File.expand_path("../app/services/trash_channel.rb", __FILE__)
|
||||
load File.expand_path("../app/services/update_channel.rb", __FILE__)
|
||||
|
Reference in New Issue
Block a user