Module: Cloudtasker::UniqueJob

Defined in:
lib/cloudtasker/unique_job.rb,
lib/cloudtasker/unique_job/job.rb,
lib/cloudtasker/unique_job/lock/no_op.rb,
lib/cloudtasker/unique_job/lock_error.rb,
lib/cloudtasker/unique_job/middleware.rb,
lib/cloudtasker/unique_job/lock/base_lock.rb,
lib/cloudtasker/unique_job/middleware/client.rb,
lib/cloudtasker/unique_job/middleware/server.rb,
lib/cloudtasker/unique_job/lock/until_executed.rb,
lib/cloudtasker/unique_job/lock/until_executing.rb,
lib/cloudtasker/unique_job/lock/while_executing.rb,
lib/cloudtasker/unique_job/conflict_strategy/raise.rb,
lib/cloudtasker/unique_job/conflict_strategy/reject.rb,
lib/cloudtasker/unique_job/conflict_strategy/reschedule.rb,
lib/cloudtasker/unique_job/conflict_strategy/base_strategy.rb

Overview

UniqueJob configurator

Defined Under Namespace

Modules: ConflictStrategy, Lock, Middleware Classes: Job, LockError

Constant Summary collapse

DEFAULT_LOCK_TTL =

The maximum duration a lock can remain in place after schedule time.

10 * 60

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.lock_ttlInteger

Return the max TTL for locks

Returns:

  • (Integer)

    The lock TTL.



27
28
29
# File 'lib/cloudtasker/unique_job.rb', line 27

def lock_ttl
  @lock_ttl || DEFAULT_LOCK_TTL
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Configure the middleware

Yields:

  • (_self)

Yield Parameters:



18
19
20
# File 'lib/cloudtasker/unique_job.rb', line 18

def configure
  yield(self)
end