File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ Prevent Multiple Executions of a Console Command
5
5
The ``LockableTrait `` was introduced in Symfony 3.2.
6
6
7
7
A simple but effective way to prevent multiple executions of the same command in
8
- a single server is to use ** locks ** . The Lock component provides a
9
- :ref: `SemaphoreStore <_lock-store-semaphore >` class and a
10
- :ref: `FlockStore <_lock-store-flock >` class that eases the creation and
11
- release of these locks .
8
+ a single server is to use ` locks `_ . The :doc: ` Lock component < /components/lock >`
9
+ provides multiple classes to create locks based on the filesystem ( :ref: `FlockStore <_lock-store-flock >`),
10
+ shared memory ( :ref: `SemaphoreStore <_lock-store-semaphore >`) and even databases
11
+ and Redis servers .
12
12
13
13
In addition, the Console component provides a PHP trait called ``LockableTrait ``
14
14
that adds two convenient methods to lock and release commands::
@@ -40,3 +40,5 @@ that adds two convenient methods to lock and release commands::
40
40
$this->release();
41
41
}
42
42
}
43
+
44
+ .. _`locks` : https://en.wikipedia.org/wiki/Lock_(computer_science)
You can’t perform that action at this time.
0 commit comments