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?