Skip to content

Commit

Permalink
Move worker startup output into callback
Browse files Browse the repository at this point in the history
  • Loading branch information
betamatt committed Jun 23, 2011
1 parent d455423 commit c6bde90
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/delayed/worker.rb
Expand Up @@ -96,11 +96,10 @@ def name=(val)
@name = val
end

set_callback :execute, :around, :clear_locks
set_callback(:execute, :around, :clear_locks)
set_callback(:execute, :before) { |worker| worker.say "Starting job worker" }

def start
say "Starting job worker"

trap('TERM') { say 'Exiting...'; stop }
trap('INT') { say 'Exiting...'; stop }

Expand Down

0 comments on commit c6bde90

Please sign in to comment.