Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.68 KB | None | 0 0
  1. <?php
  2.  
  3. use Illuminate\Support\Str;
  4.  
  5. return [
  6.  
  7.     /*
  8.     |--------------------------------------------------------------------------
  9.     | Theme
  10.     |--------------------------------------------------------------------------
  11.     |
  12.     | Here you can define which theme Horizon should load. Horizon currently
  13.     | provides a light theme and a dark theme, and you may provide one of
  14.     | those two values in order to determine which theme will get used.
  15.     |
  16.     | Supported: "light", "dark"
  17.     |
  18.     */
  19.  
  20.     'theme' => 'light',
  21.  
  22.     /*
  23.     |--------------------------------------------------------------------------
  24.     | Horizon Domain
  25.     |--------------------------------------------------------------------------
  26.     |
  27.     | This is the subdomain where Horizon will be accessible from. If this
  28.     | setting is null, Horizon will reside under the same domain as the
  29.     | application. Otherwise, this value will serve as the subdomain.
  30.     |
  31.     */
  32.  
  33.     'domain' => null,
  34.  
  35.     /*
  36.     |--------------------------------------------------------------------------
  37.     | Horizon Path
  38.     |--------------------------------------------------------------------------
  39.     |
  40.     | This is the URI path where Horizon will be accessible from. Feel free
  41.     | to change this path to anything you like. Note that the URI will not
  42.     | affect the paths of its internal API that aren't exposed to users.
  43.     |
  44.     */
  45.  
  46.     'path' => 'horizon',
  47.  
  48.     /*
  49.     |--------------------------------------------------------------------------
  50.     | Horizon Redis Connection
  51.     |--------------------------------------------------------------------------
  52.     |
  53.     | This is the name of the Redis connection where Horizon will store the
  54.     | meta information required for it to function. It includes the list
  55.     | of supervisors, failed jobs, job metrics, and other information.
  56.     |
  57.     */
  58.  
  59.     'use' => 'default',
  60.  
  61.     /*
  62.     |--------------------------------------------------------------------------
  63.     | Horizon Redis Prefix
  64.     |--------------------------------------------------------------------------
  65.     |
  66.     | This prefix will be used when storing all Horizon data in Redis. You
  67.     | may modify the prefix when you are running multiple installations
  68.     | of Horizon on the same server so that they don't have problems.
  69.     |
  70.     */
  71.  
  72.     'prefix' => env(
  73.         'HORIZON_PREFIX',
  74.         Str::slug(env('APP_NAME', 'laravel'), '_').'_horizon:'
  75.     ),
  76.  
  77.     /*
  78.     |--------------------------------------------------------------------------
  79.     | Horizon Route Middleware
  80.     |--------------------------------------------------------------------------
  81.     |
  82.     | These middleware will get attached onto each Horizon route, giving you
  83.     | the chance to add your own middleware to this list or change any of
  84.     | the existing middleware. Or, you can simply stick with this list.
  85.     |
  86.     */
  87.  
  88.     'middleware' => ['web'],
  89.  
  90.     /*
  91.     |--------------------------------------------------------------------------
  92.     | Queue Wait Time Thresholds
  93.     |--------------------------------------------------------------------------
  94.     |
  95.     | This option allows you to configure when the LongWaitDetected event
  96.     | will be fired. Every connection / queue combination may have its
  97.     | own, unique threshold (in seconds) before this event is fired.
  98.     |
  99.     */
  100.  
  101.     'waits' => [
  102.         'redis:default' => 60,
  103.     ],
  104.  
  105.     /*
  106.     |--------------------------------------------------------------------------
  107.     | Job Trimming Times
  108.     |--------------------------------------------------------------------------
  109.     |
  110.     | Here you can configure for how long (in minutes) you desire Horizon to
  111.     | persist the recent and failed jobs. Typically, recent jobs are kept
  112.     | for one hour while all failed jobs are stored for an entire week.
  113.     |
  114.     */
  115.  
  116.     'trim' => [
  117.         'recent' => 10080,
  118.         'pending' => 10080,
  119.         'completed' => 10080,
  120.         'recent_failed' => 10080,
  121.         'failed' => 10080,
  122.         'monitored' => 10080,
  123.     ],
  124.  
  125.     /*
  126.     |--------------------------------------------------------------------------
  127.     | Metrics
  128.     |--------------------------------------------------------------------------
  129.     |
  130.     | Here you can configure how many snapshots should be kept to display in
  131.     | the metrics graph. This will get used in combination with Horizon's
  132.     | `horizon:snapshot` schedule to define how long to retain metrics.
  133.     |
  134.     */
  135.  
  136.     'metrics' => [
  137.         'trim_snapshots' => [
  138.             'job' => 24,
  139.             'queue' => 24,
  140.         ],
  141.     ],
  142.  
  143.     /*
  144.     |--------------------------------------------------------------------------
  145.     | Fast Termination
  146.     |--------------------------------------------------------------------------
  147.     |
  148.     | When this option is enabled, Horizon's "terminate" command will not
  149.     | wait on all of the workers to terminate unless the --wait option
  150.     | is provided. Fast termination can shorten deployment delay by
  151.     | allowing a new instance of Horizon to start while the last
  152.     | instance will continue to terminate each of its workers.
  153.     |
  154.     */
  155.  
  156.     'fast_termination' => false,
  157.  
  158.     /*
  159.     |--------------------------------------------------------------------------
  160.     | Memory Limit (MB)
  161.     |--------------------------------------------------------------------------
  162.     |
  163.     | This value describes the maximum amount of memory the Horizon worker
  164.     | may consume before it is terminated and restarted. You should set
  165.     | this value according to the resources available to your server.
  166.     |
  167.     */
  168.  
  169.     'memory_limit' => 64,
  170.  
  171.     /*
  172.     |--------------------------------------------------------------------------
  173.     | Queue Worker Configuration
  174.     |--------------------------------------------------------------------------
  175.     |
  176.     | Here you may define the queue worker settings used by your application
  177.     | in all environments. These supervisors and settings handle all your
  178.     | queued jobs and will be provisioned by Horizon during deployment.
  179.     |
  180.     */
  181.  
  182.     'environments' => [
  183.         'production' => [
  184.             'supervisor-1' => [
  185.                 'connection' => 'redis',
  186.                 'queue' => ['default'],
  187.                 'balance' => 'simple',
  188.                 'processes' => 10,
  189.                 'tries' => 1,
  190.             ],
  191.         ],
  192.  
  193.         'local' => [
  194.             'supervisor-1' => [
  195.                 'connection' => 'redis',
  196.                 'queue' => ['default'],
  197.                 'balance' => 'simple',
  198.                 'processes' => 3,
  199.                 'tries' => 1,
  200.             ],
  201.         ],
  202.     ],
  203. ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement