Sha256: 4efd3ddc7045f0f0f1cc5b5be778fbf33f76ae30997bcbe4b9edf2c2bd3001f0
Contents?: true
Size: 646 Bytes
Versions: 52
Compression:
Stored size: 646 Bytes
Contents
# frozen_string_literal: true module Cloudtasker module UniqueJob module ConflictStrategy # This strategy raises an error on conflict, both on client and server side. class Raise < BaseStrategy RESCHEDULE_DELAY = 5 # seconds # Raise a Cloudtasker::UniqueJob::LockError def on_schedule raise_lock_error end # Raise a Cloudtasker::UniqueJob::LockError def on_execute raise_lock_error end private def raise_lock_error raise(UniqueJob::LockError, id: job.id, unique_id: job.unique_id) end end end end end
Version data entries
52 entries across 52 versions & 1 rubygems