Skip to content

Locking & Unlocking

Mika Hel edited this page Jun 30, 2018 · 3 revisions

When is my lock created?

UntilExpired

The lock is created when the client middleware runs

UntilExecuted

The lock is created when the client middleware runs

UntilExecuting

The lock is created when the client middleware runs

WhileExecuting

The lock is created when the server middleware runs.

UntilAndWhileExecuting

A first lock (UntilExecuting) is created when the client middleware runs. A second lock (WhileExecuting) is created when the server runs.

WhileExecutingReject

The lock is created when the server middleware runs. Duplicates will be pushed to the dead queue after any configured waiting time (lock_timeout) is reached.

When is my lock released?

UntilExpired

The lock is released when the configured lock_expiration is hit. No other unlocking happens, unless you specify the configuration option lock_expiration: kind_of(Integer) the lock would never be released.

UntilExecuted

The lock is released after your worker is done executing its code.

UntilExecuting

The lock (UntilExecuting) is released before your worker starts executing its code.

WhileExecuting

The lock is released after your worker is done executing its code.

UntilAndWhileExecuting

The first lock (UntilExecuting) is released before your worker starts executing its code. The second lock is released after your worker is done executing its code.

WhileExecutingReject

The locks is released after your worker is done executing its code.

Clone this wiki locally