Skip to content

Pigeon Message Processing Life Cycle Events #241

@jleonardolemos

Description

@jleonardolemos

Problem
Long running process with artisan commands just keep DB connections alive while it is running.
The problem can be easily fixed with a explicit call to DB::disconnect('connection-name'); but i need to add this to all commands.
This can be very dangerous because we can forget to add the code and because we need to edit existing code

Possible Fix
Pigeon could dispatch events to Laravel Event Bus before and after the message processing, then we can listen to this event in a classic Laravel Event listener.

Additional context
The resources kept open are very dangerous with blue green deployments just because we allocate 2x of resources for a few seconds while the container is being replaced to the new one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions