From 0910bbb75742d21b4bb97a887712606e91a4bf91 Mon Sep 17 00:00:00 2001 From: Henry Whitaker Date: Sun, 13 Dec 2020 16:29:05 +0000 Subject: [PATCH] Fixed integrations config being empty --- README.md | 2 +- app/Providers/IntegrationsServiceProvider.php | 14 ++++++++------ changelog.json | 6 ++++++ config/speedtest.php | 2 +- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index af842b51..187eba98 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Speedtest Tracker -[![Docker pulls](https://img.shields.io/docker/pulls/henrywhitaker3/speedtest-tracker?style=flat-square)](https://hub.docker.com/r/henrywhitaker3/speedtest-tracker) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/henrywhitaker3/Speedtest-Tracker/Stable?label=master&logo=github&style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/henrywhitaker3/Speedtest-Tracker/Dev?label=dev&logo=github&style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [![last_commit](https://img.shields.io/github/last-commit/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) [![issues](https://img.shields.io/github/issues/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/issues) [![commit_freq](https://img.shields.io/github/commit-activity/m/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) ![version](https://img.shields.io/badge/version-v1.10.0-success?style=flat-square) [![license](https://img.shields.io/github/license/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/blob/master/LICENSE) +[![Docker pulls](https://img.shields.io/docker/pulls/henrywhitaker3/speedtest-tracker?style=flat-square)](https://hub.docker.com/r/henrywhitaker3/speedtest-tracker) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/henrywhitaker3/Speedtest-Tracker/Stable?label=master&logo=github&style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/henrywhitaker3/Speedtest-Tracker/Dev?label=dev&logo=github&style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [![last_commit](https://img.shields.io/github/last-commit/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) [![issues](https://img.shields.io/github/issues/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/issues) [![commit_freq](https://img.shields.io/github/commit-activity/m/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) ![version](https://img.shields.io/badge/version-v1.10.1-success?style=flat-square) [![license](https://img.shields.io/github/license/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/blob/master/LICENSE) This program runs a speedtest check every hour and graphs the results. The back-end is written in [Laravel](https://laravel.com/) and the front-end uses [React](https://reactjs.org/). It uses the [Ookla's speedtest cli](https://www.speedtest.net/apps/cli) package to get the data and uses [Chart.js](https://www.chartjs.org/) to plot the results. diff --git a/app/Providers/IntegrationsServiceProvider.php b/app/Providers/IntegrationsServiceProvider.php index e896ef13..94a91825 100644 --- a/app/Providers/IntegrationsServiceProvider.php +++ b/app/Providers/IntegrationsServiceProvider.php @@ -35,18 +35,20 @@ class IntegrationsServiceProvider extends ServiceProvider */ public function boot() { - if(File::exists(env('DB_DATABASE'))) { - if(Schema::hasTable('settings')) { + if (File::exists(env('DB_DATABASE'))) { + if (Schema::hasTable('settings')) { $setting = SettingsHelper::get('healthchecks_uuid'); - if($setting !== false) { + if ($setting !== false) { try { - App::bind('healthcheck', function() use ($setting) { + SettingsHelper::loadIntegrationConfig(); + + App::bind('healthcheck', function () use ($setting) { return new Healthchecks($setting->value); }); - } catch(InvalidUuidStringException $e) { + } catch (InvalidUuidStringException $e) { Log::error('Invalid healthchecks UUID'); - } catch(Exception $e) { + } catch (Exception $e) { Log::error($e->getMessage()); } } diff --git a/changelog.json b/changelog.json index a4477778..abb384cb 100644 --- a/changelog.json +++ b/changelog.json @@ -1,4 +1,10 @@ { + "1.10.1": [ + { + "description": "Fixed integrations config being empty causing healthchecks to not run on scheduled tests.", + "link": "" + } + ], "1.10.0": [ { "description": "Added automated build for ARM.", diff --git a/config/speedtest.php b/config/speedtest.php index efa39079..8af25314 100644 --- a/config/speedtest.php +++ b/config/speedtest.php @@ -7,7 +7,7 @@ return [ |-------------------------------------------------------------------------- */ - 'version' => '1.10.0', + 'version' => '1.10.1', /* |--------------------------------------------------------------------------