Skip to main content

Asynchronous and distributed scheduling of Ewoks workflows from python

Project description

ewoksjob

Utilities for job scheduling of Ewoks workflows.

Ewoks has different interfaces to execute an ewoks workflow: python API, CLI, REST API, Qt GUI, Web GUI.

Ewoksjob provides an ewoks interface for asynchronous and distributed scheduling of ewoks workflows from python.

Note that ewoksjob distributes the execution of workflows while ewoksdask distributes the execution of tasks in a workflow. So in the context of workflows, job scheduling exists on two levels.

The primary clients that need to schedule workflows are

Installation

Install on the client side

pip install ewoksjob[fullclient]

The optional fullclient install option should be used when you want full client-side capabilities, for exampe dereference URL's of ewoks task results.

Install on the worker side

pip install ewoksjob[worker]

Getting started

Start a worker pool that can execute ewoks graphs

celery -A ewoksjob.apps.ewoks worker

Start a workflow on the client side

from ewoksjob.client import submit

workflow = {"graph": {"id": "mygraph"}}
future = submit(args=(workflow,))
result = future.get()

Note that both environments need to be able to import celeryconfig which contains celery configuration (mainly the message broker and result backend URL's).

Hello world example

Clone the git repository and start a worker pool

./examples/worker.sh

Submit the hello world workflow

python examples/helloworld.py

Tests

pytest --pyargs ewoksjob

To run the redis tests you need redis-server (e.g. conda install redis-server).

Documentation

https://ewoksjob.readthedocs.io/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ewoksjob-0.0.8a0.tar.gz (15.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page