Explorar o código

Update healthChecks.php

Updates to _healthCheckPluginRun() and _healthCheckPluginUUID to properly pass the result of $pass and allow sending of "/fail" to tell Healthchecks.io that the job has failed in real-time.
Jesse Hickman %!s(int64=5) %!d(string=hai) anos
pai
achega
2985ee2ee7
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      api/plugins/healthChecks.php

+ 3 - 3
api/plugins/healthChecks.php

@@ -72,7 +72,7 @@ class HealthChecks extends Organizr
 	
 	
 	public function _healthCheckPluginUUID($uuid, $pass = false)
 	public function _healthCheckPluginUUID($uuid, $pass = false)
 	{
 	{
-		if (!$uuid || !$pass || $this->config['HEALTHCHECKS-PingURL'] == '') {
+		if (!$uuid || $this->config['HEALTHCHECKS-PingURL'] == '') {
 			return false;
 			return false;
 		}
 		}
 		$url = $this->qualifyURL($this->config['HEALTHCHECKS-PingURL']);
 		$url = $this->qualifyURL($this->config['HEALTHCHECKS-PingURL']);
@@ -134,11 +134,11 @@ class HealthChecks extends Organizr
 						$pass = true;
 						$pass = true;
 					}
 					}
 				}
 				}
-				$this->_healthCheckPluginUUID($v['UUID'], 'true');
+				$this->_healthCheckPluginUUID($v['UUID'], $pass);
 			}
 			}
 			$this->setAPIResponse('success', null, 200, $allItems);
 			$this->setAPIResponse('success', null, 200, $allItems);
 		} else {
 		} else {
 			$this->setAPIResponse('error', 'User does not have access', 401);
 			$this->setAPIResponse('error', 'User does not have access', 401);
 		}
 		}
 	}
 	}
-}
+}