quirkey / resque-status

resque-status is an extension to the resque queue system that provides simple trackable jobs.
MIT License
514 stars 169 forks source link

Workers cannot start jobs anymore #126

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hi, after enabling resque-status and following the docs, the resque tasks cannot be started anymore. Basically, the new method

JobName.create(project_id: 13, img_path: "/media/data/")

doesnt work. I receive this error message:

ViewInitializer
Arguments
--- 73b3c99509e74412c2b38ad13c79c834
...

---
project_id: 13
img_path: "/media/data/"
Exception
ArgumentError
Error
wrong number of arguments (2 for 0)

The minimal code of my taks is

class ViewInitializer
  include Resque::Plugins::Status
  def perform
    project_id=options['project_id']
    img_path=options['img_path']
    ...
  end
end

I hope someone can help me here out. I like the plugin and would really like to use it in production...

Thanks alot!

ghost commented 9 years ago

The reson was, that I had accidently

def self.perform 
  ...
end

(self) which was from the time when resque status was not used yet.