SIP Processing Block Controller library.
Project description
SKA SDP SIP Processing Block Controller
This package contains a Celery worker for executing Processing Block workflows within the SDP SIP prototype code. This is implemented as a set of Celery tasks which can be used to asynchronously execute SIP Processing Block workflows on a Processing Block Controller (Celery Worker) instance.
Library installation
pip install skasip-pbc
Starting a containerised PBC instance
For the Processing Block Controller to function, a Redis Database instance must be created, which provides the role of the Celery Broker and Execution Control Configuration Database. Once this is available, a Processing Block Controller (Celery Worker) can be started.
For the Redis Databasem a standard redis container can be started (eg. using
the official redis:5.0.1-alpine
image). The Processing Block Controller Celery worker can be started using
the image skasip/processing_block_controller
.
A Docker Compose file (docker-compose.dev.yml
) is provided in this folder
for starting a Redis instance and a PBC Celery worker. This can be used with
the following command:
docker stack deploy -c docker-compose.dev.yml pbc
Typical usage
Note: Requires a Celery Worker, Celery Broker, and a SKA SIP Execution Control Configuration Database instance are running (see above)!
# coding: utf-8
"""Example SIP PBC usage."""
import sip_pbc
# Get the PBC version.
result = sip_pbc.version.delay()
version = result.get(timeout=1)
print(version)
# Execute a PB workflow.
result = sip_pbc.execute_processing_block.delay(pb_id='...')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for skasip_pbc-1.3.1a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07bc5ccaf362ff748dcf5c9eac1cb1f074979c94b2d860904aa9345a8f7b6583 |
|
MD5 | 853dd803410d60fd3846c330f0b5c811 |
|
BLAKE2b-256 | 2df82e2e8450d0227ef87f99892fc0c75ace6fe8e74ce01ce2322736d937687b |