aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'daemon.php')
-rw-r--r--daemon.php24
1 files changed, 19 insertions, 5 deletions
diff --git a/daemon.php b/daemon.php
index 5fa09b2..cac2adf 100644
--- a/daemon.php
+++ b/daemon.php
@@ -18,8 +18,13 @@
$result = trim($result);
echo "A job finished with return code ".$returncode.": ".$result."\n";
- $db = new mysqli(MYSQL_HOSTNAME, MYSQL_USERNAME,
- MYSQL_PASSWORD, MYSQL_DATABASE);
+ $db = new mysqli(
+ MYSQL_HOSTNAME,
+ MYSQL_USERNAME,
+ MYSQL_PASSWORD,
+ MYSQL_DATABASE
+ );
+
if (mysqli_connect_errno()) {
die("Could not connect to database ".mysqli_connect_error());
}
@@ -87,7 +92,11 @@
unlink("config.ini");
- return update_result($handle, $returncode, $nonstatusOutput);
+ return update_result(
+ $handle,
+ $returncode,
+ $nonstatusOutput
+ );
} else {
$error = "Configured build path is not writable";
return update_result($handle, -2, $error);
@@ -109,8 +118,13 @@
$insert = false;
$update = false;
- $db = new mysqli(MYSQL_HOSTNAME, MYSQL_USERNAME,
- MYSQL_PASSWORD, MYSQL_DATABASE);
+ $db = new mysqli(
+ MYSQL_HOSTNAME,
+ MYSQL_USERNAME,
+ MYSQL_PASSWORD,
+ MYSQL_DATABASE
+ );
+
if (mysqli_connect_errno()) {
die("Could not connect to database ".mysqli_connect_error());
}