0

I need something in python that forces a method to exit if it couldn't finish its task completely. Imagine you have a pipeline (several steps) and I need to allow that pipeline to execute at most an hour. If it succeeded to finish its job, then return the complete result If it took more than an hour, it should stop executing the next steps and return the current status.

Can anything do that?

N0rA
  • 612
  • 1
  • 7
  • 27
  • Sure, there are lots of ways to do that. – John Gordon Oct 29 '20 at 19:28
  • "Timeout" is the term you're looking for if I understand what you're asking. [Here's](https://stackoverflow.com/questions/492519/timeout-on-a-function-call) some ways, although exactly what you want depends on the use case. – Carcigenicate Oct 29 '20 at 19:29

0 Answers0