Skip to content

Commit

Permalink
lower priority of Message#deliver
Browse files Browse the repository at this point in the history
the vast majority of messages are not time sensitive

Change-Id: I60d808a3b00aa04c8b41b4ccfd7ba3d22eafd8f6
Reviewed-on: https://gerrit.instructure.com/164151
Tested-by: Jenkins
Reviewed-by: James Williams  <[email protected]>
Product-Review: Cody Cutrer <[email protected]>
QA-Review: Cody Cutrer <[email protected]>
  • Loading branch information
ccutrer committed Sep 12, 2018
1 parent f428313 commit 61b9a68
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/message_dispatcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class MessageDispatcher < Delayed::PerformableMethod
def self.dispatch(message)
Delayed::Job.enqueue(self.new(message, :deliver),
run_at: message.dispatch_at,
priority: 30,
max_attempts: 15)
end

Expand All @@ -34,6 +35,7 @@ def self.batch_dispatch(messages)

Delayed::Job.enqueue(self.new(self, :deliver_batch, [messages]),
run_at: messages.first.dispatch_at,
priority: 30,
max_attempts: 15)
end

Expand Down

0 comments on commit 61b9a68

Please sign in to comment.