Permalink
Browse files

Aligning assignments. You know, for readability.

  • Loading branch information...
1 parent 5d21f72 commit 8a25db395398621eb1bb1df0795e4d1e4b50031c @bryckbost bryckbost committed Mar 30, 2012
Showing with 9 additions and 9 deletions.
  1. +6 −6 lib/delayed/lifecycle.rb
  2. +3 −3 lib/delayed/worker.rb
View
12 lib/delayed/lifecycle.rb
@@ -3,12 +3,12 @@ class InvalidCallback < Exception; end
class Lifecycle
EVENTS = {
- :enqueue => [:job],
- :execute => [:worker],
- :loop => [:worker],
- :perform => [:worker, :job],
- :error => [:worker, :job],
- :failure => [:worker, :job],
+ :enqueue => [:job],
+ :execute => [:worker],
+ :loop => [:worker],
+ :perform => [:worker, :job],
+ :error => [:worker, :job],
+ :failure => [:worker, :job],
:invoke_job => [:job]
}
View
6 lib/delayed/worker.rb
@@ -96,9 +96,9 @@ def initialize(options={})
@quiet = options.has_key?(:quiet) ? options[:quiet] : true
self.class.min_priority = options[:min_priority] if options.has_key?(:min_priority)
self.class.max_priority = options[:max_priority] if options.has_key?(:max_priority)
- self.class.sleep_delay = options[:sleep_delay] if options.has_key?(:sleep_delay)
- self.class.read_ahead = options[:read_ahead] if options.has_key?(:read_ahead)
- self.class.queues = options[:queues] if options.has_key?(:queues)
+ self.class.sleep_delay = options[:sleep_delay] if options.has_key?(:sleep_delay)
+ self.class.read_ahead = options[:read_ahead] if options.has_key?(:read_ahead)
+ self.class.queues = options[:queues] if options.has_key?(:queues)
self.plugins.each { |klass| klass.new }
end

0 comments on commit 8a25db3

Please sign in to comment.