Skip to content

Commit

Permalink
Introduce dispatch callback
Browse files Browse the repository at this point in the history
  • Loading branch information
Erol committed Apr 27, 2017
1 parent 2ffe7a5 commit c0bdff3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/shoryuken.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module Shoryuken
timeout: 8,
lifecycle_events: {
startup: [],
dispatch: [],
quiet: [],
shutdown: []
},
Expand Down
2 changes: 2 additions & 0 deletions lib/shoryuken/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def dispatch_now
return
end

fire_event(:dispatch, false)

logger.debug { "Ready: #{ready}, Busy: #{busy}, Active Queues: #{@polling_strategy.active_queues}" }

batched_queue?(queue) ? dispatch_batch(queue) : dispatch_single_messages(queue)
Expand Down

0 comments on commit c0bdff3

Please sign in to comment.