Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
StanBarrows committed Sep 1, 2023
1 parent fb4f02e commit f1d5ad4
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions src/Checks/JobsCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,28 @@

class JobsCheck extends Check
{
public function run(): Result
{
$count = DB::table('jobs')->count();
public function run(): Result
{
$count = DB::table('jobs')->count();

$result = Result::make();
$result->shortSummary("jobs table count: {$count}");
$result = Result::make();
$result->shortSummary("jobs table count: {$count}");

if ($count > 0) {
return $result->failed();
}
if ($count <= 0) {
return $result->ok();
}

return $result->ok();
}
sleep(15);

$newCount = DB::table('jobs')->count();

$result->shortSummary("jobs table count: {$newCount}");

if ($count != $newCount) {
return $result->ok();
}

return $result->failed();

}
}

0 comments on commit f1d5ad4

Please sign in to comment.