saeedvaziry
4 months ago

Laravel horizon without sleeping

Posted 4 months ago by saeedvaziry

I am using laravel 5.8 with horizon 3.2 and every thing is fine until there is a job that waiting to process. When the jobs queue goes empty, horizon sleeps for almost 1 minute or more.

How can i reduce horizon's sleeping time?

Here is my horizon config in config/horizon.php:

...
'environments' => [
    'production' => [
        'supervisor-default' => [
            'connection' => 'redis',
            'queue' => ['default'],
            'balance' => false,
            'processes' => 30,
            'tries' => 3,
            'sleep' => 0.5
        ]
    ]
]
...

I am using supervisord to run horizon

Please sign in or create an account to participate in this conversation.