Skip to content

Create a python method to stop a run #4

@hansende

Description

@hansende

Create a Python Method in the existing FlowMetr Python class to stop a run for a flow, which can be called like:

flow1.stop(node_id="stop-trigger", run_id="my first run", logs="just started")

logs: optional

The method stop will create a http get request to the flowmetr backend like:

https://flowmetr.com/hooks/339a7c52-58eb-4537-ab92-9a57f0bae96b?run_id=c0940c1f0c8c2f66&node_id=stop-trigger&node_type=stop&logs=Stopped&project_token=f815f37293f415e33e3b8542cc6eefa433809e1777774632f2343668792f3dd1

the stop method adds the node_type "stop" to this request

Test:

Can be tested locally with FlowMetr started through docker
compose or with a flow in Flowmetr Cloud.

When successful there a previously started flow is stopped after calling the method, which can be watched in the related public dashboard:
https://flowmetr.com/public/projects/f0cf4767cd9c42f2713954c1ea9cc097b31488b6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions