You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
I think this feature will need a study in order to set default exit codes. An example would be analyzing some well-know commands and see what is the exit code they return when stopped via signal (e.g. control + c).
If my understanding is right, this feature will also introduce a breaking change because users of this library either don't expect exit codes (other than 0) or have their own logic to return the exit codes.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
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 ifSignalExtension
stopped the consumption.The text was updated successfully, but these errors were encountered: