| File classes/Build.php changed (mode: 100644) (index f4cef89..8dfb9d8) |
| ... |
... |
class Build |
| 111 |
111 |
} |
} |
| 112 |
112 |
|
|
| 113 |
113 |
/** |
/** |
| 114 |
|
* @brief Updates status of the build. |
|
| 115 |
|
* |
|
| 116 |
|
* @param status New status string. |
|
|
114 |
|
* @brief Updates the build to indicate that it has been started. |
| 117 |
115 |
*/ |
*/ |
| 118 |
|
public function setStatus($status) |
|
|
116 |
|
public function markAsStarted() |
| 119 |
117 |
{ |
{ |
| 120 |
|
$sql = 'UPDATE builds SET status = ? ' |
|
|
118 |
|
$sql = 'UPDATE builds SET status = "running" ' |
| 121 |
119 |
. 'WHERE buildset = ? AND buildername = ?'; |
. 'WHERE buildset = ? AND buildername = ?'; |
| 122 |
120 |
$statement = DB::prepare($sql); |
$statement = DB::prepare($sql); |
| 123 |
121 |
if (!$statement || |
if (!$statement || |
| 124 |
|
$statement->execute([$status, $this->buildset, |
|
|
122 |
|
$statement->execute([$this->buildset, |
| 125 |
123 |
$this->buildername]) === false) { |
$this->buildername]) === false) { |
| 126 |
|
die("Failed to set build status to 'running'\n" |
|
|
124 |
|
die("Failed to mark build as started\n" |
| 127 |
125 |
. print_r(DB::errorInfo(), true)); |
. print_r(DB::errorInfo(), true)); |
| 128 |
126 |
} |
} |
| 129 |
127 |
|
|