mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-19 19:21:10 +01:00
28 lines
609 B
PHP
28 lines
609 B
PHP
|
<?php
|
||
|
|
||
|
$table = new HarbormasterBuildable();
|
||
|
$conn = $table->establishConnection('w');
|
||
|
|
||
|
foreach (new LiskMigrationIterator($table) as $buildable) {
|
||
|
if ($buildable->getBuildableStatus() !== 'building') {
|
||
|
continue;
|
||
|
}
|
||
|
|
||
|
$aborted = queryfx_one(
|
||
|
$conn,
|
||
|
'SELECT * FROM %T WHERE buildablePHID = %s AND buildStatus = %s',
|
||
|
id(new HarbormasterBuild())->getTableName(),
|
||
|
$buildable->getPHID(),
|
||
|
'aborted');
|
||
|
if (!$aborted) {
|
||
|
continue;
|
||
|
}
|
||
|
|
||
|
queryfx(
|
||
|
$conn,
|
||
|
'UPDATE %T SET buildableStatus = %s WHERE id = %d',
|
||
|
$table->getTableName(),
|
||
|
'failed',
|
||
|
$buildable->getID());
|
||
|
}
|