Skip to content

Programmatically cancelling a pipelinerunner.run #321

Answered by yaythomas
qwertimer asked this question in Q&A
Discussion options

You must be logged in to vote

hi @qwertimer ,

You might want to investigate making your pipelines so that they will exit at certain points... This is a cleaner way of shutting down the process, which might matter or not depending on exactly what you're doing and what systems pypyr is interacting with.

For this sort of thing, you might want to check pypyr.steps.stop and then conditionally letting the stop step run:

steps:
  - name: pypyr.steps.set
    in:
      set:
        stop_me: !py input("type 1 ENTER to stop, anything else will continue:\n")

  - name: pypyr.steps.stop
    description: -> will stop here if stop_me is 1, true or TRUE
    run: '{stop_me}'

  - name: pypyr.steps.echo
    comment: you won't see this …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by yaythomas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants