Skip to content

Commit a7015b7

Browse files
improve documentation for 0.4 release
1 parent a93d97e commit a7015b7

File tree

7 files changed

+180
-205
lines changed

7 files changed

+180
-205
lines changed

components.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Components
2+
==========
3+
The library consists of three main parts.
4+
5+
TaskScheduler
6+
-------------
7+
The ``TaskScheduler`` stores tasks and schedules executions. For each task
8+
there exists exactly one execution in the status ``planned`` or ``running``. If
9+
the task will only one time it only get one execution at all. For recurring
10+
tasks a new execution will be generated when the old one is ``completed`` or
11+
``failed``.
12+
13+
Each task consists of:
14+
15+
- ``uuid``: unique identifier
16+
- ``handlerClass``: class-name of the handler which will be executed for this
17+
task
18+
- ``workload``: the workload will be passed to the handler
19+
- ``interval``: for recurring tasks this fields contains a cron-expression
20+
- ``firstExecution``: the earliest possible execution
21+
- ``lastExecution``: the latest possible execution
22+
23+
TaskRunner
24+
----------
25+
The ``TaskRunner`` takes the ``planned`` executions and executes the ``Handler``
26+
with the workload of the task.
27+
28+
Handler
29+
-------
30+
The ``Handler`` implements the domain-logic for a task. The library implements
31+
a Factory which uses Reflection to create a new instance for the
32+
``handlerClass`` of the task.
33+
34+
.. note::
35+
36+
The :doc:`symfony` uses tagged-services to find available ``Handler``.

0 commit comments

Comments
 (0)