A task scheduler for cyclic and acyclic graphs
Project description
pypushflow
A task scheduler for cyclic and acyclic graphs
Install
pip install pypushflow[mx]
Use the mx
option for installation at MX beamlines.
Run tests
pip install pypushflow[test]
pytest
Getting started
import logging
from pypushflow.Workflow import Workflow
from pypushflow.StopActor import StopActor
from pypushflow.StartActor import StartActor
from pypushflow.PythonActor import PythonActor
from pypushflow.ThreadCounter import ThreadCounter
class MyWorkflow(Workflow):
def __init__(self, name):
super().__init__(name, level=logging.DEBUG)
ctr = ThreadCounter(parent=self)
self.startActor = StartActor(parent=self, thread_counter=ctr)
self.pythonActor = PythonActor(
parent=self,
script="pypushflow.tests.tasks.pythonActorTest.py",
name="Python Actor Test",
thread_counter=ctr,
)
self.stopActor = StopActor(parent=self, thread_counter=ctr)
self.startActor.connect(self.pythonActor)
self.pythonActor.connect(self.stopActor)
testMyWorkflow = MyWorkflow("Test workflow")
inData = {"name": "World"}
outData = testMyWorkflow.run(inData, timeout=15, pool_type="process")
assert outData["reply"] == "Hello World!"
Documentation
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
pypushflow-1.3.0.tar.gz
(31.2 kB
view details)
File details
Details for the file pypushflow-1.3.0.tar.gz
.
File metadata
- Download URL: pypushflow-1.3.0.tar.gz
- Upload date:
- Size: 31.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4be3c418a691b18549269a5240606efc4d6b8f425b7668af1eacc31bcdd11b1e
|
|
MD5 |
40495f718e8e3dab4f9e0749d64c5eea
|
|
BLAKE2b-256 |
977354b29c0845a001a55d9b9478048eeebe396185da562d89071e1d0f0a242c
|