Prostore::Migration::Lease
Lease-based mutex for migrations (ADR-0009 invariant 5).
Constants
DEFAULT_DURATION = 5.minutes
Instance methods
claim(adapter, executor : Adapter::Base::Executor, migration_id : Int64, runner_id : String, duration : Time::Span = DEFAULT_DURATION) : Bool
Returns true if the lease was successfully claimed; false if another live lease is held.
heartbeat(adapter, executor : Adapter::Base::Executor, migration_id : Int64, runner_id : String, duration : Time::Span = DEFAULT_DURATION) : Bool
Sourcerelease(adapter, executor : Adapter::Base::Executor, migration_id : Int64, runner_id : String) : Nil
Sourcerunner_id
Source