ecs-watchbot
ecs-watchbot copied to clipboard
add exit code for 'no-op, remove from queue'
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
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?