Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a way to timeout a running flow. #13

Open
Chengxuan opened this issue Sep 27, 2018 · 0 comments
Open

Need a way to timeout a running flow. #13

Chengxuan opened this issue Sep 27, 2018 · 0 comments

Comments

@Chengxuan
Copy link

In IBM App Connect, this lib is the one we've chosen as the framework for our integration executions. To ensure the fairness and control the workload of our back-end system, we set a maximum running time for each integration/flow.

I couldn't find any easy way to achieve that in this lib. Here is my current workaround:

  1. set the expiry time as a global value in the context of the flow before start running the flow.
  2. each task will first check the expiry time in their execute function, if the flow is expired, the task will call flow.fail(TimeoutError) to terminate the flow.
  3. the error event listener will distinguish this special error and tell the user the flow is timed out.

Do you have a better way of achieving this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant