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

Validate return status for shell scripts #40

Closed
nsoria1 opened this issue Sep 16, 2018 · 1 comment
Closed

Validate return status for shell scripts #40

nsoria1 opened this issue Sep 16, 2018 · 1 comment

Comments

@nsoria1
Copy link

nsoria1 commented Sep 16, 2018

Hi team, thanks for sharing this tool.

I would like to know where should I modify the python code to evaluate the status code from shell scripts to make it fail if it is different than zero.

Thanks!
Nicolas.

@sabw8217
Copy link
Contributor

Somewhere in the run method of the Job subclass you are using. For example, in the sample jobs, you would need to do something with the return value of the call function:
https://github.com/Nextdoor/ndscheduler/blob/master/simple_scheduler/jobs/shell_job.py#L24

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

No branches or pull requests

2 participants