Commit 7af77399 authored by Armando Luescher's avatar Armando Luescher

Merge branch 'fixgo' into 'develop'

fix for pods that have gone offline recently from go random select

See merge request !226
parents 9fa752ef 166fc347
Pipeline #1067 passed with stage
in 2 minutes and 41 seconds
......@@ -9,6 +9,15 @@ The format is based on [Keep a Changelog] and this project adheres to [Semantic
### Fixed
### Security
## [2.5.x]
### Added
### Changed
### Deprecated
### Removed
### Fixed
- go.php will only use online pods
### Security
## [2.5.1] - 2018-12-09
### Changed
- use file_get_contents less and prefer curl and copy to make things more stable
......
......@@ -9,6 +9,7 @@ declare(strict_types=1);
use Carbon\Carbon;
use Jaybizzle\CrawlerDetect\CrawlerDetect;
use RedBeanPHP\R;
use Poduptime\PodStatus;
// Other parameters.
$_domain = $_GET['domain'] ?? '';
......@@ -30,9 +31,10 @@ try {
AND uptime_alltime > 95
AND monthsmonitored > 1
AND softwarename = ?
AND status = ?
ORDER BY random()
LIMIT 1
', [$_software]);
', [$_software, PodStatus::UP]);
$domain || die('no domains exist');
} else {
$click = 'autoclick';
......@@ -43,9 +45,10 @@ try {
AND uptime_alltime > 96
AND monthsmonitored > 2
AND pods.masterversion = shortversion
AND status = ?
ORDER BY random()
LIMIT 1
');
', [PodStatus::UP]);
$domain || die('no domains exist');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment