-
Notifications
You must be signed in to change notification settings - Fork 439
Closed
Labels
Description
Scenario
I've custom commands to consume messages and I'm using ExitStatusExtension like in ConsumeCommand. $exitStatusExtension->getExitStatus() is the primary way to return the command's exit code.
Issue
It seems no built-in extension (e.g. SignalExtension, LimitConsumedMessagesExtension) does implement the necessary code to return the exit status because $context->interruptExecution() is always called without arguments.
The correct return code will be very useful to inform to the process manager (e.g. supervisord, systemd) to restart the consumer or not. Example: one might want to restart the consumer if LimitConsumerMemoryExtension stopped the consumption, but he might not want to restart if SignalExtension stopped the consumption.