Update horizon.php config

pull/4902/head
Daniel Supernault 2024-02-07 02:52:37 -07:00
rodzic ac01f51ab6
commit 1e3acadefb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 23740873EE6F76A1
1 zmienionych plików z 175 dodań i 174 usunięć

Wyświetl plik

@ -2,201 +2,202 @@
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Horizon Domain | Horizon Domain
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This is the subdomain where Horizon will be accessible from. If this | This is the subdomain where Horizon will be accessible from. If this
| setting is null, Horizon will reside under the same domain as the | setting is null, Horizon will reside under the same domain as the
| application. Otherwise, this value will serve as the subdomain. | application. Otherwise, this value will serve as the subdomain.
| |
*/ */
'domain' => null, 'domain' => null,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Horizon Path | Horizon Path
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This is the URI path where Horizon will be accessible from. Feel free | This is the URI path where Horizon will be accessible from. Feel free
| to change this path to anything you like. Note that the URI will not | to change this path to anything you like. Note that the URI will not
| affect the paths of its internal API that aren't exposed to users. | affect the paths of its internal API that aren't exposed to users.
| |
*/ */
'path' => 'horizon', 'path' => 'horizon',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Horizon Redis Connection | Horizon Redis Connection
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This is the name of the Redis connection where Horizon will store the | This is the name of the Redis connection where Horizon will store the
| meta information required for it to function. It includes the list | meta information required for it to function. It includes the list
| of supervisors, failed jobs, job metrics, and other information. | of supervisors, failed jobs, job metrics, and other information.
| |
*/ */
'use' => 'default', 'use' => 'default',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Horizon Redis Prefix | Horizon Redis Prefix
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This prefix will be used when storing all Horizon data in Redis. You | This prefix will be used when storing all Horizon data in Redis. You
| may modify the prefix when you are running multiple installations | may modify the prefix when you are running multiple installations
| of Horizon on the same server so that they don't have problems. | of Horizon on the same server so that they don't have problems.
| |
*/ */
'prefix' => env('HORIZON_PREFIX', 'horizon-'), 'prefix' => env('HORIZON_PREFIX', 'horizon-'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Horizon Route Middleware | Horizon Route Middleware
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| These middleware will get attached onto each Horizon route, giving you | These middleware will get attached onto each Horizon route, giving you
| the chance to add your own middleware to this list or change any of | the chance to add your own middleware to this list or change any of
| the existing middleware. Or, you can simply stick with this list. | the existing middleware. Or, you can simply stick with this list.
| |
*/ */
'middleware' => ['web'], 'middleware' => ['web'],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Queue Wait Time Thresholds | Queue Wait Time Thresholds
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This option allows you to configure when the LongWaitDetected event | This option allows you to configure when the LongWaitDetected event
| will be fired. Every connection / queue combination may have its | will be fired. Every connection / queue combination may have its
| own, unique threshold (in seconds) before this event is fired. | own, unique threshold (in seconds) before this event is fired.
| |
*/ */
'waits' => [ 'waits' => [
'redis:feed' => 30, 'redis:feed' => 30,
'redis:follow' => 30, 'redis:follow' => 30,
'redis:shared' => 30, 'redis:shared' => 30,
'redis:default' => 30, 'redis:default' => 30,
'redis:inbox' => 30, 'redis:inbox' => 30,
'redis:low' => 30, 'redis:low' => 30,
'redis:high' => 30, 'redis:high' => 30,
'redis:delete' => 30, 'redis:delete' => 30,
'redis:story' => 30, 'redis:story' => 30,
'redis:mmo' => 30, 'redis:mmo' => 30,
], 'redis:intbg' => 30,
],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Job Trimming Times | Job Trimming Times
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Here you can configure for how long (in minutes) you desire Horizon to | Here you can configure for how long (in minutes) you desire Horizon to
| persist the recent and failed jobs. Typically, recent jobs are kept | persist the recent and failed jobs. Typically, recent jobs are kept
| for one hour while all failed jobs are stored for an entire week. | for one hour while all failed jobs are stored for an entire week.
| |
*/ */
'trim' => [ 'trim' => [
'recent' => 60, 'recent' => 60,
'pending' => 60, 'pending' => 60,
'completed' => 60, 'completed' => 60,
'recent_failed' => 10080, 'recent_failed' => 10080,
'failed' => 10080, 'failed' => 10080,
'monitored' => 10080, 'monitored' => 10080,
], ],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Metrics | Metrics
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Here you can configure how many snapshots should be kept to display in | Here you can configure how many snapshots should be kept to display in
| the metrics graph. This will get used in combination with Horizon's | the metrics graph. This will get used in combination with Horizon's
| `horizon:snapshot` schedule to define how long to retain metrics. | `horizon:snapshot` schedule to define how long to retain metrics.
| |
*/ */
'metrics' => [ 'metrics' => [
'trim_snapshots' => [ 'trim_snapshots' => [
'job' => 24, 'job' => 24,
'queue' => 24, 'queue' => 24,
], ],
], ],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Fast Termination | Fast Termination
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| When this option is enabled, Horizon's "terminate" command will not | When this option is enabled, Horizon's "terminate" command will not
| wait on all of the workers to terminate unless the --wait option | wait on all of the workers to terminate unless the --wait option
| is provided. Fast termination can shorten deployment delay by | is provided. Fast termination can shorten deployment delay by
| allowing a new instance of Horizon to start while the last | allowing a new instance of Horizon to start while the last
| instance will continue to terminate each of its workers. | instance will continue to terminate each of its workers.
| |
*/ */
'fast_termination' => false, 'fast_termination' => false,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Memory Limit (MB) | Memory Limit (MB)
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This value describes the maximum amount of memory the Horizon worker | This value describes the maximum amount of memory the Horizon worker
| may consume before it is terminated and restarted. You should set | may consume before it is terminated and restarted. You should set
| this value according to the resources available to your server. | this value according to the resources available to your server.
| |
*/ */
'memory_limit' => env('HORIZON_MEMORY_LIMIT', 64), 'memory_limit' => env('HORIZON_MEMORY_LIMIT', 64),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Queue Worker Configuration | Queue Worker Configuration
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Here you may define the queue worker settings used by your application | Here you may define the queue worker settings used by your application
| in all environments. These supervisors and settings handle all your | in all environments. These supervisors and settings handle all your
| queued jobs and will be provisioned by Horizon during deployment. | queued jobs and will be provisioned by Horizon during deployment.
| |
*/ */
'environments' => [ 'environments' => [
'production' => [ 'production' => [
'supervisor-1' => [ 'supervisor-1' => [
'connection' => 'redis', 'connection' => 'redis',
'queue' => ['high', 'default', 'follow', 'shared', 'inbox', 'feed', 'low', 'story', 'delete', 'mmo'], 'queue' => ['high', 'default', 'follow', 'shared', 'inbox', 'feed', 'low', 'story', 'delete', 'mmo', 'intbg'],
'balance' => env('HORIZON_BALANCE_STRATEGY', 'auto'), 'balance' => env('HORIZON_BALANCE_STRATEGY', 'auto'),
'minProcesses' => env('HORIZON_MIN_PROCESSES', 1), 'minProcesses' => env('HORIZON_MIN_PROCESSES', 1),
'maxProcesses' => env('HORIZON_MAX_PROCESSES', 20), 'maxProcesses' => env('HORIZON_MAX_PROCESSES', 20),
'memory' => env('HORIZON_SUPERVISOR_MEMORY', 64), 'memory' => env('HORIZON_SUPERVISOR_MEMORY', 64),
'tries' => env('HORIZON_SUPERVISOR_TRIES', 3), 'tries' => env('HORIZON_SUPERVISOR_TRIES', 3),
'nice' => env('HORIZON_SUPERVISOR_NICE', 0), 'nice' => env('HORIZON_SUPERVISOR_NICE', 0),
'timeout' => env('HORIZON_SUPERVISOR_TIMEOUT', 300), 'timeout' => env('HORIZON_SUPERVISOR_TIMEOUT', 300),
], ],
], ],
'local' => [ 'local' => [
'supervisor-1' => [ 'supervisor-1' => [
'connection' => 'redis', 'connection' => 'redis',
'queue' => ['high', 'default', 'follow', 'shared', 'inbox', 'feed', 'low', 'story', 'delete', 'mmo'], 'queue' => ['high', 'default', 'follow', 'shared', 'inbox', 'feed', 'low', 'story', 'delete', 'mmo', 'intbg'],
'balance' => 'auto', 'balance' => 'auto',
'minProcesses' => 1, 'minProcesses' => 1,
'maxProcesses' => 20, 'maxProcesses' => 20,
'memory' => 128, 'memory' => 128,
'tries' => 3, 'tries' => 3,
'nice' => 0, 'nice' => 0,
'timeout' => 300 'timeout' => 300
], ],
], ],
], ],
'darkmode' => env('HORIZON_DARKMODE', false), 'darkmode' => env('HORIZON_DARKMODE', false),
]; ];