mirror of
https://github.com/discourse/discourse.git
synced 2025-01-23 17:37:48 +08:00
PERF: only allow one reviewable notification at a time (#26331)
This job may notify hundreds of mods and take quite a while to run. Co-authored-by: Sam <sam.saffron@gmail.com>
This commit is contained in:
parent
7d9c8993cd
commit
7e7b2cf7b5
|
@ -1,6 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Jobs::NotifyReviewable < ::Jobs::Base
|
||||
# this job can take a very long time if there are many mods
|
||||
# do not swamp the queue with it
|
||||
cluster_concurrency 1
|
||||
|
||||
def execute(args)
|
||||
return unless reviewable = Reviewable.find_by(id: args[:reviewable_id])
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user