t-kanstantsin/yii2-action-lock-behavior

Allow run only one action instance at once

1.3 2018-07-12 13:56 UTC

README

Yii2 widget

Latest Stable Version Total Downloads

Basic

Behavior allow deny multiple runs of same console application action (e.g. long time executing task initiated with cron).

Lock source should be chosen carefully noting following:

  • File source simple but can be used only with one docker container instance because its not possible determine if process still running or ended in another container. Requires only writable directory

  • Db source requires database with transaction support. May be used only with single database instance.