Skip to content

Commit

Permalink
refactor: add env to facilitate library configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
xel1045 committed Jan 13, 2025
1 parent f80982e commit 78bcfe4
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions config/heartbeat.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,21 @@
'presets' => [
'file' => [
'channel' => 'file',
'file' => '/tmp/file.heartbeat',
'file' => env('HEARTBEAT_FILE', '/tmp/file.heartbeat'),
],

'http' => [
'channel' => 'http',
'url' => 'https://beats.envoyer.io/heartbeat/example',
'url' => env('HEARTBEAT_URL', 'https://beats.envoyer.io/heartbeat/example'),
'options' => [
//
],
],

'disk' => [
'channel' => 'disk',
'disk' => 'local',
'file' => 'disk.heartbeat',
],

/*
|--------------------------------------------------------------------------
| Queue preset
|--------------------------------------------------------------------------
|
| Here is a default configuration that could be used to monitor your queue system.
| See configuration option `job_schedule` below.
|
*/

'queue' => [
'channel' => 'disk',
'disk' => 'local',
'file' => 'queue.heartbeat',
'disk' => env('HEARTBEAT_DISK', env('FILESYSTEM_DISK', 'local')),
'file' => env('HEARTBEAT_DISK_FILE', 'disk.heartbeat'),
],
],

Expand All @@ -63,7 +47,7 @@
*/

'job_schedule' => [
'preset' => env('HEARTBEAT_JOB_SCHEDULE_PRESET', 'queue'),
'preset' => env('HEARTBEAT_JOB_SCHEDULE_PRESET', 'disk'),

'cron' => env('HEARTBEAT_JOB_SCHEDULE_CRON', '*/15 * * * *'),
],
Expand Down

0 comments on commit 78bcfe4

Please sign in to comment.