mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 01:22:36 +08:00
PERF: lower the priority on user emails
User emails can wait behind other regular jobs, they are usually somewhat slower as they involve smtp transactions
This commit is contained in:
parent
9e2131ace8
commit
24abf38d38
|
@ -6,6 +6,8 @@ module Jobs
|
|||
# Asynchronously send an email to a user
|
||||
class UserEmail < Jobs::Base
|
||||
|
||||
sidekiq_options queue: 'low'
|
||||
|
||||
def execute(args)
|
||||
raise Discourse::InvalidParameters.new(:user_id) unless args[:user_id].present?
|
||||
raise Discourse::InvalidParameters.new(:type) unless args[:type].present?
|
||||
|
|
Loading…
Reference in New Issue
Block a user