Skip to content

Commit

Permalink
🐛 The number of links pending checks did not exclude links that have …
Browse files Browse the repository at this point in the history
…health checks disabled
  • Loading branch information
wyred committed Sep 3, 2020
1 parent 6cac1a7 commit 2ec3168
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/Services/HealthCheckStats.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ public function countDead()
public function countPending()
{
return \DB::table('links')
->where('http_checked_at', '<', now()->subDays(app(Shaark::class)->getLinkHealthChecksAge()))
->orWhereNull('http_checked_at')
->where('is_health_check_enabled', 1)
->where(function ($query) {
return $query->where('http_checked_at', '<', now()->subDays(app(Shaark::class)->getLinkHealthChecksAge()))
->orWhereNull('http_checked_at');
})
->count();
}

Expand Down

0 comments on commit 2ec3168

Please sign in to comment.