Download the PHP package cellard/process-manager without Composer
On this page you can find all versions of the php package cellard/process-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cellard/process-manager
More information about cellard/process-manager
Files in cellard/process-manager
Package process-manager
Short Description Manage cron task multi-threading
License MIT
Informations about the package process-manager
[Cron] Process Manager
Manager allows you to control cron task threads.
Only one instance of cron task is allowed. Next one will be rejected if previous still running.
example.php
As process management based on process id you do not need to manually release lock, it will be auto released.
Instead of instantiating ProcessManager
class you may use static shortcut.
Closure style
In this example two instances of cron task may run simultaneously.
converter.php
Subject
When working with queue, we need to control each task will be executed just once.
We may define process subject with task number (or something like that).
In this example there will be maximum two processes, and each file will be converted just once.
This example may be shortened.
How it works
Process Manager keeps locks with process id. It watches if process is alive and automatically releases lock if process disappears.
Even if your task running for hours — manager will watch it activity.
Drivers
Filesystem
Used by default. Manager keeps lock files in system temp directory, but you may redefine it.
Redis
Namespaces
As manager store locks in Filesystem or in Redis keys, it is possible that different projects will use the same names. To prevent conflicts it is recommended to redefine manager's prefix.
All versions of process-manager with dependencies
mozartk/process-finder Version ^1.0
ext-mbstring Version *
predis/predis Version *