Permalink
Browse files

fix queue type problems from rabbit 1.7 to 1.8

  • Loading branch information...
1 parent 1e53aae commit 230467f4068ece800244105a104b68897f4c20d1 Orion Henry committed Jul 28, 2010
Showing with 19 additions and 19 deletions.
  1. +1 −1 Rakefile
  2. +1 −1 VERSION
  3. +2 −2 examples/math.rb
  4. +4 −4 examples/sandwich.rb
  5. +4 −4 examples/when.rb
  6. +2 −2 lib/minion.rb
  7. +5 −5 minion.gemspec
View
@@ -9,7 +9,7 @@ Jeweler::Tasks.new do |s|
s.homepage = "http://github.com/orionz/minion"
s.rubyforge_project = "minion"
s.files = FileList["[A-Z]*", "{bin,lib,spec}/**/*"]
- s.add_dependency "amqp", ">= 0.6.6"
+ s.add_dependency "amqp", ">= 0.6.7"
s.add_dependency "bunny", ">= 0.6.0"
s.add_dependency "json", ">= 1.2.0"
end
View
@@ -1 +1 @@
-0.1.14
+0.1.15
View
@@ -8,8 +8,8 @@
error do |exception,queue,message,headers|
puts "got an error processing queue #{queue}"
- puts exception.message
- puts exception.backtrace
+ puts exception.message
+ puts exception.backtrace
end
logger do |msg|
View
@@ -7,9 +7,9 @@
include Minion
error do |exception,queue,message,headers|
- puts "got an error processing queue #{queue}"
- puts exception.message
- puts exception.backtrace
+ puts "got an error processing queue #{queue}"
+ puts exception.message
+ puts exception.backtrace
end
job "add.bread" do |args|
@@ -25,7 +25,7 @@
end
job "eat.sandwich" do |args|
- puts "YUM! A #{args['meat']} on #{args['bread']} sandwich with #{args['condiments']}"
+ puts "YUM! A #{args['meat']} on #{args['bread']} sandwich with #{args['condiments']}"
end
enqueue(["add.bread", "add.meat", "add.condiments", "eat.sandwich" ])
View
@@ -7,9 +7,9 @@
include Minion
error do |exception,queue,message,headers|
- puts "got an error processing queue #{queue}"
- puts exception.message
- puts exception.backtrace
+ puts "got an error processing queue #{queue}"
+ puts exception.message
+ puts exception.backtrace
end
logger do |msg|
@@ -18,7 +18,7 @@
$listen = true
-job "do.once", :when => lambda { $listen } do |args|
+job "do.once", :when => lambda { $listen } do |args|
puts "Do this one action - then unsubscribe..."
$listen = false
end
View
@@ -46,11 +46,11 @@ def job(queue, options = {}, &blk)
handler.when = options[:when] if options[:when]
handler.unsub = lambda do
log "unsubscribing to #{queue}"
- MQ.queue(queue).unsubscribe
+ MQ.queue(queue, :durable => true, :auto_delete => false).unsubscribe
end
handler.sub = lambda do
log "subscribing to #{queue}"
- MQ.queue(queue).subscribe(:ack => true) do |h,m|
+ MQ.queue(queue, :durable => true, :auto_delete => false).subscribe(:ack => true) do |h,m|
return if AMQP.closing?
begin
log "recv: #{queue}:#{m}"
View
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = %q{minion}
- s.version = "0.1.14"
+ s.version = "0.1.15"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Orion Henry"]
- s.date = %q{2010-07-27}
+ s.date = %q{2010-07-28}
s.description = %q{Super simple job queue over AMQP}
s.email = %q{orion@heroku.com}
s.extra_rdoc_files = [
@@ -43,16 +43,16 @@ Gem::Specification.new do |s|
s.specification_version = 3
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<amqp>, [">= 0.6.6"])
+ s.add_runtime_dependency(%q<amqp>, [">= 0.6.7"])
s.add_runtime_dependency(%q<bunny>, [">= 0.6.0"])
s.add_runtime_dependency(%q<json>, [">= 1.2.0"])
else
- s.add_dependency(%q<amqp>, [">= 0.6.6"])
+ s.add_dependency(%q<amqp>, [">= 0.6.7"])
s.add_dependency(%q<bunny>, [">= 0.6.0"])
s.add_dependency(%q<json>, [">= 1.2.0"])
end
else
- s.add_dependency(%q<amqp>, [">= 0.6.6"])
+ s.add_dependency(%q<amqp>, [">= 0.6.7"])
s.add_dependency(%q<bunny>, [">= 0.6.0"])
s.add_dependency(%q<json>, [">= 1.2.0"])
end

0 comments on commit 230467f

Please sign in to comment.