When implementing perform
as a class method as described on Resque's Wiki page for ActiveJob, a NotImplementedError
occurs, because ActiveJob cannot find JobClass#perform
.
After removing self
in front of perform
, the error is gone.
class Archive < ActiveJob::Base
queue_as :default
def perform(repo_id, branch = 'master')
repo = Repository.find(repo_id)
repo.create_archive(branch)
end
end
Thank you for your issue.
Looks like the wiki has been fixed since then. Closing this.
You have not changed the wiki page, please change it ASAP, it is causing a lot of confusion.
@akshaysharma096 first, the Wiki was indeed updated here. Second, I don't think any open source contributors appreciate demands being made. If you have an issue, we are happy to help when able, but we are not your paid employees, we are volunteers trying to help the open source community. Try to be more polite next time you raise an issue.
Most helpful comment
@akshaysharma096 first, the Wiki was indeed updated here. Second, I don't think any open source contributors appreciate demands being made. If you have an issue, we are happy to help when able, but we are not your paid employees, we are volunteers trying to help the open source community. Try to be more polite next time you raise an issue.