ewoksserver is a REST server to manage and execute ewoks workflows.
It serves as a backend for ewoksweb and emits ewoks execution events over Socket.IO.
Install the ewoksserver Python package
pip install ewoksserver
Install from source
pip install -e .[dev]Run tests
pytestLaunch the backend
ewoks-serveror for an installation with the system python
python3 -m ewoksserver.serverThe configuration keys are uppercase variables in a python script:
# /tmp/config.py
RESOURCE_DIRECTORY = "/path/to/resource/directory/"
EWOKS_EXECUTION = {"handlers": ...}
CELERY = {"broker_url":...}Specify the configuration file through the CLI
ewoks-server --config /tmp/config.pyor using the environment variable EWOKSSERVER_SETTINGS
export EWOKSSERVER_SETTINGS=/tmp/config.py
ewoks-serverimport os
_SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))
RESOURCE_DIRECTORY = os.path.join(_SCRIPT_DIR, "resources")
EWOKS_EXECUTION = {
"handlers": [
{
"class": "ewokscore.events.handlers.Sqlite3EwoksEventHandler",
"arguments": [
{
"name": "uri",
"value": "file:" + os.path.join(_SCRIPT_DIR, "ewoks_events.db"),
}
],
}
]
}