-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from php-task/enhancement/doc
Improve documentation for 0.4 release
- Loading branch information
Showing
7 changed files
with
180 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Components | ||
========== | ||
The library consists of three main parts. | ||
|
||
TaskScheduler | ||
------------- | ||
The ``TaskScheduler`` stores tasks and schedules executions. For each task | ||
there exists exactly one execution in the status ``planned`` or ``running``. If | ||
the task will only one time it only get one execution at all. For recurring | ||
tasks a new execution will be generated when the old one is ``completed`` or | ||
``failed``. | ||
|
||
Each task consists of: | ||
|
||
- ``uuid``: unique identifier | ||
- ``handlerClass``: class-name of the handler which will be executed for this | ||
task | ||
- ``workload``: the workload will be passed to the handler | ||
- ``interval``: for recurring tasks this fields contains a cron-expression | ||
- ``firstExecution``: the earliest possible execution | ||
- ``lastExecution``: the latest possible execution | ||
|
||
TaskRunner | ||
---------- | ||
The ``TaskRunner`` takes the ``planned`` executions and executes the ``Handler`` | ||
with the workload of the task. | ||
|
||
Handler | ||
------- | ||
The ``Handler`` implements the domain-logic for a task. The library implements | ||
a Factory which uses Reflection to create a new instance for the | ||
``handlerClass`` of the task. | ||
|
||
.. note:: | ||
|
||
The :doc:`symfony` uses tagged-services to find available ``Handler``. |
Oops, something went wrong.