Skip to content

Commit

Permalink
enable by plulse config
Browse files Browse the repository at this point in the history
  • Loading branch information
geowrgetudor committed Dec 5, 2023
1 parent ebd4d99 commit 3ebcb03
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ This is the contents of the published config file:

```php
return [
/**
* Determines the state o the package
*/
'enabled' => env('GEOW_DISK_METRICS', true),

/**
* Track disks defined in filesystems.php config file.
* Support only 'local' or 's3' driver.
Expand Down Expand Up @@ -78,7 +73,9 @@ return [
'recorders' => [
// Existing recorders...
\Geow\DiskMetrics\Recorders\DiskRecorder::class => []
\Geow\DiskMetrics\Recorders\DiskRecorder::class => [
'enabled' => env('GEOW_DISK_METRICS', true),
]
]
]
```
Expand Down
5 changes: 0 additions & 5 deletions config/disk-metrics.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<?php

return [
/**
* Determines the state o the package
*/
'enabled' => env('GEOW_DISK_METRICS', true),

/**
* Track disks defined in filesystems.php config file.
* Support only 'local' or 's3' driver.
Expand Down
4 changes: 0 additions & 4 deletions src/Recorders/DiskRecorder.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ public function __construct(

public function record(SharedBeat $event): void
{
if (!config('disk-metrics.enabled', false)) {
return;
}

if ($event->time->minute % DiskMetrics::interval() !== 0) {
return;
}
Expand Down

0 comments on commit 3ebcb03

Please sign in to comment.