File: ewoks_events.rst

package info (click to toggle)
python-ewoks 0.6.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 552 kB
  • sloc: python: 1,311; makefile: 5
file content (30 lines) | stat: -rw-r--r-- 888 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Enable Ewoks events during execution
====================================

Events can be emitted by *ewoks* during the execution of a workflow to notify
about progress and potential errors. For this you can specify one or more
destinations where the events should be send to.

To specify event handlers from python:

.. code:: python

    from ewoks import execute_graph

    execinfo = {
        "job_id": "1234",
        "handlers": [
            {
                "class": "ewokscore.events.handlers.Sqlite3EwoksEventHandler",
                "arguments": [{"name": "uri",
                               "value": "file:/tmp/ewoks_event.db"}],
            }
        ],
    }
    results = execute_graph("/path/to/file.json", execinfo=execinfo)

To specify event handlers from the command line:

.. code:: bash

    ewoks execute /path/to/file.json -j 1234 --sqlite3 /shared/path/test.db