From 68793bff197d47be9f5742c78eff0b547281c83e Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Mon, 19 May 2014 14:00:14 +0200 Subject: Refactor Resque adapter to be more consistent with others --- lib/active_job/queue_adapters/resque_adapter.rb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lib/active_job/queue_adapters') diff --git a/lib/active_job/queue_adapters/resque_adapter.rb b/lib/active_job/queue_adapters/resque_adapter.rb index bb5f3df8d6..6686f10593 100644 --- a/lib/active_job/queue_adapters/resque_adapter.rb +++ b/lib/active_job/queue_adapters/resque_adapter.rb @@ -7,16 +7,12 @@ module ActiveJob class ResqueAdapter class << self def queue(job, *args) - Resque.enqueue *JobWrapper.wrap(job, args) + Resque.enqueue JobWrapper.new(job), job, *args end end class JobWrapper class << self - def wrap(job, args) - [ new(job), *args.prepend(job) ] - end - def perform(job_name, *args) job_name.constantize.new.perform *Parameters.deserialize(args) end @@ -27,9 +23,9 @@ module ActiveJob end def to_s - self.class.to_s + self.class.name end end end end -end \ No newline at end of file +end -- cgit v1.2.3