lib/cloudtasker/backend/memory_task.rb in cloudtasker-0.10.rc5 vs lib/cloudtasker/backend/memory_task.rb in cloudtasker-0.10.rc6
- old
+ new
@@ -1,9 +1,7 @@
# frozen_string_literal: true
-require 'cloudtasker/redis_client'
-
module Cloudtasker
module Backend
# Manage local tasks pushed to memory.
# Used for testing.
class MemoryTask
@@ -151,10 +149,11 @@
#
# @return [Any] The return value of the worker perform method.
#
def execute
# Execute worker
- resp = WorkerHandler.with_worker_handling(payload, &:execute)
+ worker_payload = payload.merge(job_retries: job_retries, task_id: id)
+ resp = WorkerHandler.with_worker_handling(worker_payload, &:execute)
# Delete task
self.class.delete(id)
resp
rescue StandardError