mirror of https://github.com/MarceauKa/shaark.git
🐛 The number of links pending checks did not exclude links that have health checks disabled
This commit is contained in:
parent
6cac1a7fb7
commit
2ec3168f91
|
@ -62,8 +62,11 @@ class HealthCheckStats
|
|||
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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue