Skip to content

Flow callback function #20

@lechat

Description

@lechat

Hi, Lars,

Another suggestion: I have lenghty subflow, and I want to send email once that flow have finished. If I add email function inside with serial(...) - it will be called right when flow is parsed. So I have to make send_email job and call it from flow. Kind of inneficient.

What I suggest is to have an ability to register callback functions with the flow:

with serial(...) as main_flow:
    main_flow.on_success(some_callable)
    main_flow.on_failure(some_other_callable)
    main_flow.invoke('job1')

That way I don't have to do a separate job and can do interesting things from the same script.

Thanks!

Aleksey

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions