-
-
Save parndt/7670598 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GroupJob | |
def initialize(attributes = {}) | |
#do stuff | |
end | |
def perform | |
# do stuff | |
end | |
def success(job) | |
_job = scheduled_job(job.id) | |
_job.delayed_job_id = nil | |
_job.job_status_id = 2 | |
_job.save | |
end | |
private | |
def scheduled_job(delayed_job_id) | |
ScheduledJob.where(delayed_job_id: delayed_job_id).first | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment