, , , ...
, , , . ..:
Delayed::Job.enqueue InstructionRequestJob.new( p1, p2 )
InstructionRequestJob perform
- perform a task on a remote server
- get a response
- case response
when OK
update attribute ( as suggested)
else
if too_many_attempts
update attribute
destroy the job
else
reschedule the job for another attempt
- end
source
share