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

add exit code for 'no-op, remove from queue' #148

Open
perrygeo opened this issue May 25, 2017 · 1 comment
Open

add exit code for 'no-op, remove from queue' #148

perrygeo opened this issue May 25, 2017 · 1 comment

Comments

@perrygeo
Copy link
Contributor

perrygeo commented May 25, 2017

Currently we can return either 0 or 3 in order to remove a message from the queue.

  • exit 0 = valid message + success
  • exit 3 = failure without retry, GTFO

Let’s say the input Message is perfectly valid but the application doesn’t need to process it for whatever reason. Its not really a success (no output) and its not really a failure (if the job chose to continue, it would have succeeded). Depending on how you exit from such jobs, you might either be artificially inflating your log counts of true successes or true failures.

What about another exit code to cover this case?

  • exit X = valid message but no-op, remove from queue. Thanks, but no thanks. bye bye.

Functionally exit X would behave just like exit 3 but the distinction might allow for more accurate log analysis. Think of it as a more polite exit 3 😄

cc @rclark @jakepruitt

@rclark
Copy link
Contributor

rclark commented Jun 5, 2017

The result here would actually be the same as exit 0: remove the message from the queue, don't consider the job a failure. Any reason you can't just use 0 for what you're imagining here? Perhaps the application logs themselves would be the thing that would inform you as to whether or not it was a no-op?

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