-
Notifications
You must be signed in to change notification settings - Fork 48
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
One failing task seems to stop independent tasks being recorded as done #114
Comments
Thanks for posting. So the default redun behavior is when multiple child tasks run in parallel ( To clarify what you're seeing in your logs, redun does not currently implement actively killing sibling jobs ( If you would like to deliberately wait for all parallel tasks to finish before propagating the failure up the job tree, you can use the @task
def recover(values):
# Here, I can look at values to see which are Files or Exceptions.
# We can reraise the except or try to process the failed job again, or any number of recovery strategies.
raise MyException("One of the child tasks failed")
@task
def main() -> List[File]:
bad_file = fast_fail("out/freddy", "Hello Freddy\n")
good_file = slow_and_steady("out/jimmy", "Hello Jimmy\n")
logger.info("main task at end")
return catch_all([bad_file, good_file], MyException, recover) Let me know if that helps. |
That's perfect, thank you! I wonder whether this should be added to the docs somewhere besides the API reference? Perhaps another heading in the Tasks section of the user guide? |
I expected a failing task not to interfere with other independent succeeding tasks.
What I am seeing is a slow but successful task does in fact complete, but is left in state
RUN
when shown in redun console. I would expect to see that task asDONE
.Here's the redun console output some time after this has all completed (sorry about the screenshot):
Here's my code:
And here's the log output showing that the slow and steady task does actually complete:
Is there something I should be doing to get done tasks to be recorded as done in the database?
The text was updated successfully, but these errors were encountered: