I am happy to announce another improvement of my PHP library "PHP-Task". This improvement was initiated by a customer project of Sulu and is already in use for real-world projects.
As the big new feature of the release, it allows the rescheduling of failing tasks.
Retry of failing tasks
Some of the tasks which will be executed by a handler are risky and could fail. This includes for example long running processes or tasks which need to wait for I/O (input/output).
If these tasks fail the retry will be scheduled as soon as possible. To indicate that the task was rescheduled a newly introduced property "attempts" will be increased. Each handler can specify a maximum number of attempts for the execution. Afterwards, the task will be marked as failed.
To enable this feature you can simply change the configuration value of "task.executor.type" to "seperate". This executor uses the symfony/process component to call the symfony command "task:execute" in an own process.
By using an own process the tasks cannot influence each other and make the cronjob more stable and reliable.
You can update the library and the bundle by running following command which updates the database schema.
Now you are able to use the new features. Stay tuned for upcoming things.