Skip to content

Commit

Permalink
fix problems with json 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Orion Henry committed Jul 28, 2010
1 parent 035eb33 commit 1e53aae
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/minion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
module Minion
extend self

def url=(url)
@@config_url = url
end
def url=(url)
@@config_url = url
end

def enqueue(jobs, data = {})
raise "cannot enqueue a nil job" if jobs.nil?
Expand All @@ -23,8 +23,9 @@ def enqueue(jobs, data = {})
queue = jobs
end

log "send: #{queue}:#{data.to_json}"
bunny.queue(queue, :durable => true, :auto_delete => false).publish(data.to_json)
encoded = JSON.dump(data)
log "send: #{queue}:#{encoded}"
bunny.queue(queue, :durable => true, :auto_delete => false).publish(encoded)
end

def log(msg)
Expand Down

0 comments on commit 1e53aae

Please sign in to comment.