Skip to content

Improve documentation for 0.4 release #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions components.rst
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``.
Loading