Skip to content
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

Script status: Always "Success" #262

Open
DaJansenGit opened this issue Sep 14, 2018 · 1 comment
Open

Script status: Always "Success" #262

DaJansenGit opened this issue Sep 14, 2018 · 1 comment

Comments

@DaJansenGit
Copy link

Refering to the closed #118:
Is there a way to set the script status on "error" or something like that (and not "Success") if the script throwed an exception? I found nothing in the issues or documentation except the closed #118 issue.
Thanks in advance!

@DaJansenGit DaJansenGit changed the title Success Script status: Always "Success" Sep 14, 2018
@Chris7
Copy link
Member

Chris7 commented Sep 14, 2018

It would be possible if:

  • Script used sys.exit(your_main_function(...)) and your_main_function returned a 0 for success (this isn't a hard requirement, but if it is missing, your script will always return success unless an Exception was hit)
  • A TASK_FAILED state was added to disambiguate between task failures and task runner failures (celery failures)
  • submit_script was updated to pass the returncode of proc to the job, and the subsequent signal handling by celery (task_completed) knew not to change the return value

PRs are always welcome ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants