Thanks for the feedbacks, updated the code based on your feedbacks

Shaoshan

From: Sharad Gandhi <notifications@github.com<mailto:notifications@github.com>>
Reply-To: linkedin/naarad <reply@reply.github.com<mailto:reply@reply.github.com>>
Date: Tuesday, February 25, 2014 2:43 PM
To: linkedin/naarad <naarad@noreply.github.com<mailto:naarad@noreply.github.com>>
Cc: Shaoshan Liu <shliu@linkedin.com<mailto:shliu@linkedin.com>>
Subject: Re: [naarad] Implement optional Naarad return codes: the return code, if enabled, reflects the number of metric failures (#137)


In bin/naarad:

> @@ -284,5 +288,11 @@ def main():
>        correlated_plots = []
>      rpt = Report(None, outdir_default, resource_directory, resource_path, metrics, correlated_plots=correlated_plots)
>      rpt.generate()
> +  # return value only if exit_code is set to True, by default this is False
> +  global ret
> +  if args.exit_code != 'False':
> +    if ret > 0:
> +      sys.exit(ret)


we will get a different return code based on how many SLAs failed. maybe better to have a specific code for SLA failure and define in naarad_constants

—
Reply to this email directly or view it on GitHub<https://github.com/linkedin/naarad/pull/137/files#r10060147>.