Project

General

Profile

Actions

Feature #106261

open

Add --time-limit option to messenger:consume

Added by Bastian Stargazer 17 days ago. Updated 16 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
-
Start date:
2025-02-26
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
messenger
Complexity:
Sprint Focus:

Description

The original Symfony messenger (https://symfony.com/doc/current/messenger.html) has an option --time-limit to specify, how long the messenger:consume service should run before shuts down automatically.

This is useful for environments, where it is not possible to create a system service which re-starts automatically, e.g. in shared-hosting environments (or on all other servers without root access).

In this case it would be nice, if the messenger:consume could be triggered regularly e.g. by the Scheduler (The Scheduler already can be triggered regularly by external HTTP Cron request).

For example: Lets say, the messenger command is scheduled with */5 * * * * and executes messenger:consume --time-limit=16200. So it runs for a bit, shuts down after 4,5 minutes and is restarted if the scheduler invokes the command again after the next 5 minutes passed.

Actions

Also available in: Atom PDF