You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the following step to check the status of new workflows:
@hatchet.step(parents=["features"])asyncdefwait_for_children(
self, context: Context
):
document_id=context.step_output("features")["document_id"]
child_workflow_run_ids=context.step_output("features")["child_workflow_run_ids"]
root_logger.info(f"Will wait for {len(child_workflow_run_ids)} child workflow runs to finish")
results= []
foridinchild_workflow_run_ids:
results.append(awaithatchet.client.admin.get_workflow_run(id).result())
is_done=all(result["finish_process_document"]["done"] isTrueforresultinresults)
ifnotis_done:
root_logger.error("Some child workflows could not finish.")
raiseException("Some child workflows could not finish.")
return {"document_id": document_id, "child_workflow_run_ids": child_workflow_run_ids}
I was able to capture workflow statuses correctly using version 0.26.4 of the library. However, I tried to update to version 0.27.0 and use log capture according to the documentation at this link: https://docs.hatchet.run/sdks/python-sdk/logging
From then on, I can no longer capture the statuses correctly. I think the error in question is related to this commit: f42bcfb
All other steps in my workflow are synchronous
Bug error:
The text was updated successfully, but these errors were encountered:
Hey @ArthurMor4is, it looks like this is caused by a step returning something that is a coroutine. At first glance, this doesn't look related to logging, but could be due to some recent changes we made to the return values of spawn_workflow and run_workflow.
Is there any chance you could share the relevant code for the features step? Or share how you're calling spawn_workflow?
Context:
I'm using the following step to check the status of new workflows:
I was able to capture workflow statuses correctly using version 0.26.4 of the library. However, I tried to update to version 0.27.0 and use log capture according to the documentation at this link: https://docs.hatchet.run/sdks/python-sdk/logging
From then on, I can no longer capture the statuses correctly. I think the error in question is related to this commit: f42bcfb
All other steps in my workflow are synchronous
Bug error:
The text was updated successfully, but these errors were encountered: