Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze authored and github-actions[bot] committed Jan 13, 2025
1 parent be253b0 commit 812d35f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/Commands/PauseHealthChecksCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
class PauseHealthChecksCommand extends Command
{
public const CACHE_KEY = 'health_paused';

public const DEFAULT_TTL = 300;

protected $signature = 'health:pause {seconds=' . self::DEFAULT_TTL . '}';
protected $signature = 'health:pause {seconds='.self::DEFAULT_TTL.'}';

protected $description = 'Pause all health checks for the giving time';

public function handle(): int
Expand All @@ -19,7 +21,7 @@ public function handle(): int

Cache::put(self::CACHE_KEY, true, $seconds);

$this->comment('All health check paused until ' . now()->addSeconds($seconds)->toDateTimeString());
$this->comment('All health check paused until '.now()->addSeconds($seconds)->toDateTimeString());

return self::SUCCESS;
}
Expand Down
1 change: 1 addition & 0 deletions src/Commands/ResumeHealthChecksCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
class ResumeHealthChecksCommand extends Command
{
protected $signature = 'health:resume';

protected $description = 'Resume all health checks';

public function handle(): int
Expand Down
5 changes: 2 additions & 3 deletions tests/Commands/ResumeChecksCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
use Illuminate\Contracts\Cache\Repository;
use Illuminate\Support\Facades\Cache;
use Spatie\Health\Commands\PauseHealthChecksCommand;

use Spatie\Health\Commands\ResumeHealthChecksCommand;

use function Pest\Laravel\artisan;

it('forgets cache value', function () {
Expand All @@ -21,6 +21,5 @@

artisan(ResumeHealthChecksCommand::class)
->assertSuccessful()
->expectsOutput('All health check resumed')
;
->expectsOutput('All health check resumed');
});

0 comments on commit 812d35f

Please sign in to comment.