mr javad
mr javad

Reputation: 183

Laravel horizon not processing jobs

I install laravel horizon on a laravel 5.7 project and config it like this:

    'domain' => null,
    'path' => 'horizon',
    'use' => 'default',
    'prefix' => env('HORIZON_PREFIX', 'horizon:'),
    'waits' => [
        'redis:default' => 60,
    ],
    'trim' => [
        'recent' => 60,
        'completed' => 60,
        'recent_failed' => 10080,
        'failed' => 10080,
        'monitored' => 10080,
    ],
   'fast_termination' => false,
   'memory_limit' => 64,
   'environments' => [
    'production'=>[
        'save_report' => [
                'connection' => 'redis',
                'queue' => ['save_report'],
                'balance' => 'auto',
                'processes' => 5,
                'tries' => 1,
            ],
    ],
        'local' => [
            'save_report' => [
                'connection' => 'redis',
                'queue' => ['save_report'],
                'balance' => 'auto',
                'processes' => 5,
                'tries' => 1,
            ],

        ],
    ],

This is full horizon config, and I'm almost sure it's ok. But in the horizon panel, all the job is paused!

paused jobs

php artisan horizon is active on my terminal.

Upvotes: 3

Views: 6711

Answers (1)

Juan Macias
Juan Macias

Reputation: 171

Check that your environment in .env is "production"

The environment name must match Horizon configuration.

Upvotes: 16

Related Questions