Skip to content
Snippets Groups Projects
Commit dc0d71af authored by jurgenhaas's avatar jurgenhaas
Browse files

Ping a new healthcheck after creation

parent da21e5a7
No related branches found
No related tags found
1 merge request!11Merging develop into main
Pipeline #522107 passed
......@@ -6,6 +6,7 @@ use Henrywhitaker3\Healthchecks\Exceptions\HealthchecksAccountLimitReachedExcept
use Henrywhitaker3\Healthchecks\Exceptions\HealthchecksFailureException;
use Henrywhitaker3\Healthchecks\Exceptions\HealthchecksUnauthorisedException;
use Henrywhitaker3\Healthchecks\Exceptions\HealthchecksUuidNotFoundException;
use Henrywhitaker3\Healthchecks\Healthchecks;
use Henrywhitaker3\Healthchecks\HealthchecksManager;
use LakeDrops\Component\Composer\BaseHandler;
use LakeDrops\DockerTraefik\Traefik;
......@@ -570,8 +571,12 @@ class Handler extends BaseHandler {
}
try {
$check = $hj_manager->createCheck($task);
$parts = explode('/', $check['ping_url']);
$uuid = array_pop($parts);
$hj_check = new Healthchecks($uuid);
$hj_check->success();
}
catch (HealthchecksAccountLimitReachedException | HealthchecksUnauthorisedException $e) {
catch (HealthchecksFailureException | HealthchecksUuidNotFoundException | HealthchecksAccountLimitReachedException | HealthchecksUnauthorisedException $e) {
// Ignoring this for now.
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment