Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

no need to encode/decode in two places

  • Loading branch information...
commit 6097a40ed6116703be18356202b1cf7b6cbd71ce 1 parent ad26f5d
@gnufied authored
View
2  lib/backgroundrb/rails_worker_proxy.rb
@@ -30,7 +30,7 @@ def method_missing(method_id,*args)
elsif worker_method =~ /^enq_(\w+)/i
raise NoJobKey.new("Must specify a job key with enqueued tasks") if job_key.blank?
method_name = $1
- marshalled_args = Base64.encode64(Marshal.dump(arg))
+ marshalled_args = Marshal.dump(arg)
enqueue_task(compact(:worker_name => worker_name.to_s,:worker_key => worker_key.to_s,
:worker_method => method_name.to_s,:job_key => job_key.to_s, :priority => priority,
:args => marshalled_args,:timeout => arguments ? arguments[:timeout] : nil,:scheduled_at => new_schedule))
View
2  server/lib/meta_worker.rb
@@ -337,7 +337,7 @@ def check_for_enqueued_tasks
if self.respond_to? task.worker_method
Thread.current[:persistent_job_id] = task[:id]
Thread.current[:job_key] = task[:job_key]
- args = Marshal.load(Base64.decode64(task.args))
+ args = Marshal.load(task.args)
invoke_user_method(task.worker_method,args)
else
task.release_job
Please sign in to comment.
Something went wrong with that request. Please try again.