lib/cloudtasker/backend/memory_task.rb in cloudtasker-0.10.0 vs lib/cloudtasker/backend/memory_task.rb in cloudtasker-0.10.1
- old
+ new
@@ -164,9 +164,12 @@
resp = WorkerHandler.with_worker_handling(worker_payload, &:execute)
# Delete task
self.class.delete(id)
resp
+ rescue DeadWorkerError => e
+ self.class.delete(id)
+ raise(e) if self.class.inline_mode?
rescue StandardError => e
self.job_retries += 1
raise(e) if self.class.inline_mode?
end