Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15415751
D20553.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D20553.diff
View Options
diff --git a/src/applications/drydock/management/DrydockManagementLeaseWorkflow.php b/src/applications/drydock/management/DrydockManagementLeaseWorkflow.php
--- a/src/applications/drydock/management/DrydockManagementLeaseWorkflow.php
+++ b/src/applications/drydock/management/DrydockManagementLeaseWorkflow.php
@@ -151,13 +151,15 @@
while (!$is_active) {
$lease->reload();
+ $pager = id(new AphrontCursorPagerView())
+ ->setBeforeID($log_cursor);
+
// While we're waiting, show the user any logs which the daemons have
// generated to give them some clue about what's going on.
$logs = id(new DrydockLogQuery())
->setViewer($viewer)
->withLeasePHIDs(array($lease->getPHID()))
- ->setBeforeID($log_cursor)
- ->execute();
+ ->executeWithCursorPager($pager);
if ($logs) {
$logs = mpull($logs, null, 'getID');
ksort($logs);
diff --git a/src/applications/drydock/query/DrydockLogQuery.php b/src/applications/drydock/query/DrydockLogQuery.php
--- a/src/applications/drydock/query/DrydockLogQuery.php
+++ b/src/applications/drydock/query/DrydockLogQuery.php
@@ -2,11 +2,17 @@
final class DrydockLogQuery extends DrydockQuery {
+ private $ids;
private $blueprintPHIDs;
private $resourcePHIDs;
private $leasePHIDs;
private $operationPHIDs;
+ public function withIDs(array $ids) {
+ $this->ids = $ids;
+ return $this;
+ }
+
public function withBlueprintPHIDs(array $phids) {
$this->blueprintPHIDs = $phids;
return $this;
@@ -126,6 +132,13 @@
protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {
$where = parent::buildWhereClauseParts($conn);
+ if ($this->ids !== null) {
+ $where[] = qsprintf(
+ $conn,
+ 'id IN (%Ls)',
+ $this->ids);
+ }
+
if ($this->blueprintPHIDs !== null) {
$where[] = qsprintf(
$conn,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 21, 7:44 AM (1 d, 7 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7689950
Default Alt Text
D20553.diff (1 KB)
Attached To
Mode
D20553: Fix two straggling pagination issues in Drydock
Attached
Detach File
Event Timeline
Log In to Comment