Skip to main content

Helper modules for the `ecmind_blue_client` to ease the work with workflows, models and organisations.

Project description

ECMind blue client: Workflow

Helper modules for the ecmind_blue_client to ease the work with workflows, models and organisations. See discussion here: https://hub.ecmind.ch/t/119

Installation

pip install ecmind_blue_client_workflow

Usage

from ecmind_blue_client.tcp_client import TcpClient as Client
from ecmind_blue_client_workflow import workflow

client = Client(hostname='localhost', port=4000, appname='test', username='root', password='optimal')
print(workflow.get_organisations(client, only_active=True))

Monitoring

Check for failed workflows

Check all active workflow models for suspended processes.

from ecmind_blue_client.tcp_client import TcpClient as Client
from ecmind_blue_client_workflow import workflow

client = Client(hostname='localhost', port=4000, appname='test', username='root', password='optimal')

orgs = workflow.get_organisations(client, only_active=True)
for org_id in orgs:
    workflows = workflow.admin_get_workflow_list(client, org_id)
    for workflow_id in workflows:
        processes = workflow.admin_get_process_list(client, org_id, workflow_id=workflow_id)
        for process_id in processes:
            process = processes[process_id]
            if process['state'] == workflow.State.SUSPENDED or process['state'] == workflow.State.SYSSUSPENDED:
                print(f'Process with id {process_id} and name {process["name"]} is suspended')

Running processes statistics

List all aktive workflow models with the count of running processes.

from ecmind_blue_client.tcp_client import TcpClient as Client
from ecmind_blue_client_workflow import workflow

client = Client(hostname='localhost', port=4000, appname='test', username='root', password='optimal')

orgs = workflow.get_organisations(client, only_active=True)
for org_id in orgs:
    workflows = workflow.admin_get_workflow_list(client, org_id)
    for workflow_id in workflows:
        wf = workflows[workflow_id]
        print(f'Workflow {wf["name"]} has {wf["process_count"]} running processes')

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

ecmind_blue_client_workflow-0.0.3.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file ecmind_blue_client_workflow-0.0.3.tar.gz.

File metadata

  • Download URL: ecmind_blue_client_workflow-0.0.3.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for ecmind_blue_client_workflow-0.0.3.tar.gz
Algorithm Hash digest
SHA256 ea6350188fd88d0e099e7fbe4cdcb574e89275c28abdd9d2f34d8600f469d522
MD5 7e78ef2d37c9caf1f6f75dc5484367d0
BLAKE2b-256 f429b51b125a7d5be07d06075335f32916ab05c4d87b3aeb3b602ba2f8845bfa

See more details on using hashes here.

File details

Details for the file ecmind_blue_client_workflow-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: ecmind_blue_client_workflow-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for ecmind_blue_client_workflow-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9e1a447e833aa9b5de0eb5b85c0fd205e4d086d51f965b2de7885acbf3bddf80
MD5 46121595e5273993fba29b486fa3b1d9
BLAKE2b-256 bc24b4c131d5d6c17df8c9dcaf099a2af7fe4da01cd40c76529f3f243a9f14d1

See more details on using hashes here.

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