From dddfca4eb1599209ac192677c65c91f5661e955b Mon Sep 17 00:00:00 2001 From: Henry Whitaker Date: Fri, 24 Jul 2020 12:53:08 +0100 Subject: [PATCH] Updated to v1.7.13 Clear queue on container restart (#192) --- README.md | 2 +- conf/etc/cont-init.d/50-speedtest | 3 ++ conf/site/README.md | 2 +- .../Console/Commands/ClearQueueCommand.php | 43 +++++++++++++++++++ conf/site/changelog.json | 6 +++ conf/site/config/speedtest.php | 2 +- 6 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 conf/site/app/Console/Commands/ClearQueueCommand.php diff --git a/README.md b/README.md index 0d7b770c..60507e65 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) [![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.7.12-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) [![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.7.13-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 [Ookla's Speedtest cli](https://www.speedtest.net/apps/cli) to get the data and uses [Chart.js](https://www.chartjs.org/) to plot the results. diff --git a/conf/etc/cont-init.d/50-speedtest b/conf/etc/cont-init.d/50-speedtest index e65f2145..cc82afa4 100644 --- a/conf/etc/cont-init.d/50-speedtest +++ b/conf/etc/cont-init.d/50-speedtest @@ -104,6 +104,9 @@ else sed "s,BASE_PATH=.*,BASE_PATH=$BASE_PATH," -i.bak /config/www/.env fi +echo "Clearing old jobs from queue" +php /config/www/artisan queue:clear + mkdir -p /config/log/speedtest cp /defaults/crontab /etc/crontabs/root diff --git a/conf/site/README.md b/conf/site/README.md index 72b70107..75ee3253 100644 --- a/conf/site/README.md +++ b/conf/site/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) [![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.7.12-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) [![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.7.13-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/conf/site/app/Console/Commands/ClearQueueCommand.php b/conf/site/app/Console/Commands/ClearQueueCommand.php new file mode 100644 index 00000000..78dd42d8 --- /dev/null +++ b/conf/site/app/Console/Commands/ClearQueueCommand.php @@ -0,0 +1,43 @@ +delete(); + } +} diff --git a/conf/site/changelog.json b/conf/site/changelog.json index c1088395..e30cced7 100644 --- a/conf/site/changelog.json +++ b/conf/site/changelog.json @@ -1,4 +1,10 @@ { + "1.7.13": [ + { + "description": "Added command to clear application queue.", + "link": "" + } + ], "1.7.12": [ { "description": "Updated dependencies.", diff --git a/conf/site/config/speedtest.php b/conf/site/config/speedtest.php index 7e352a0a..5ed8cce8 100644 --- a/conf/site/config/speedtest.php +++ b/conf/site/config/speedtest.php @@ -7,7 +7,7 @@ return [ |-------------------------------------------------------------------------- */ - 'version' => '1.7.12', + 'version' => '1.7.13', /* |--------------------------------------------------------------------------