diff --git a/.gitignore b/.gitignore index 80a81fbdb0d1ee7f93292d028c4a52676e504bf1..47d7c58a6c1555a5eb7f6ebbe566eccac0d366fe 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /composer.lock /.ahoy.l3d /.ahoy.yml +/.lakedrops.yml diff --git a/composer.json b/composer.json index 48711b729dc2c6f415039bbf75559d4266d89381..bea8e3d939a489eafbc0353f9e604a8f23d68e56 100644 --- a/composer.json +++ b/composer.json @@ -58,7 +58,9 @@ }, "config": { "allow-plugins": { - "lakedrops/ahoy": true + "dealerdirect/phpcodesniffer-composer-installer": true, + "lakedrops/ahoy": false, + "lakedrops/drupal-environment": false } } } diff --git a/src/Handler.php b/src/Handler.php index effa4bbe7cc8bf65911b49e9e98663f97ed26c2a..1cd655f599c767be1e1255a3b22eed7f9ad10728 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -519,14 +519,14 @@ class Handler extends BaseHandler { 'dest' => $projectRoot . '/backup', 'condition' => $this->config->readValue(['backup', 'enable']), ]; - $files['crontab.txt'] = [ + $files['crontab.txt'] = [ 'source' => 'backup/', 'dest' => $projectRoot . '/backup', 'condition' => $this->config->readValue(['backup', 'enable']), ]; - // Manage crontabs and optionally add them to heathcheck-io - $hj_api_url = getenv('HEALTHCHECK_API_URL'); + // Manage crontabs and optionally add them to heathcheck-io. + $hj_url = getenv('HEALTHCHECK_URL'); $hj_api_key = getenv('HEALTHCHECK_API_KEY'); $hj_api_channels = getenv('HEALTHCHECK_API_CHANNELS'); $hj_project = $this->config->readValue('projectname'); @@ -535,8 +535,8 @@ class Handler extends BaseHandler { $hj_checks = []; $hj_manager = NULL; - if (!empty($hj_api_url) && !empty($hj_api_key)) { - $hj_manager = new HealthchecksManager($hj_api_key, $hj_api_url); + if (!empty($hj_url) && !empty($hj_api_key)) { + $hj_manager = new HealthchecksManager($hj_api_key, $hj_url . '/api/v1/'); try { $hj_checks = $hj_manager->listChecks(); } @@ -575,14 +575,14 @@ class Handler extends BaseHandler { } if (!$check) { if ($disabled) { - // This task is disabled. As it doesn't exist yet, nothing to do. + // This task is disabled as it doesn't exist yet, nothing to do. continue; } try { $check = $hj_manager->createCheck($task); $parts = explode('/', $check['ping_url']); $uuid = array_pop($parts); - $hj_check = new Healthchecks($uuid); + $hj_check = new Healthchecks($uuid, $hj_url . '/ping/'); $hj_check->success(); } catch (HealthchecksFailureException | HealthchecksUuidNotFoundException | HealthchecksAccountLimitReachedException | HealthchecksUnauthorisedException $e) {