Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14083046
D19091.id45756.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
881 B
Referenced Files
None
Subscribers
None
D19091.id45756.diff
View Options
diff --git a/resources/sql/autopatches/20180214.harbor.01.aborted.php b/resources/sql/autopatches/20180214.harbor.01.aborted.php
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20180214.harbor.01.aborted.php
@@ -0,0 +1,27 @@
+<?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());
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 2:38 AM (19 h, 36 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6780726
Default Alt Text
D19091.id45756.diff (881 B)
Attached To
Mode
D19091: Fail outstanding buildables with aborted builds
Attached
Detach File
Event Timeline
Log In to Comment