Hello, what’s the best idiom for marking a task of...
# ask-community
t
Hello, what’s the best idiom for marking a task of executing some k8s job via
RunNamespacedJob
as a failure (within the job itself) ? or is it impossible because the command is async?
i guess it would be
exit (1)
or something from within the python that runs in the job? but will prefect know about it?
a
It depends on what you are doing within this Kubernetes job - if this is a python process, you can raise an error or raise Prefect Signal. But if this is a non-Python process, it should be enough to force the job to return a non-zero exit code
1
t
ya it is a python process, but is the
RunNamespacedJob
async or not? does it wait around to find out the status at the end of the job?
ok i think it worked 😄 thanks
👍 1