Skip to content

Unable to use the proper exit code #1096

Closed
@gnumoksha

Description

@gnumoksha

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions