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,