getRequest(); if ($request->getStr('new')) { $task = new PhabricatorWorkerTask(); $task->setTaskClass('PhabricatorGoodForNothingWorker'); $task->setPriority(4); $task->setFailureCount(0); $task->save(); } $tasks = id(new PhabricatorWorkerTask()) ->loadAll(); $rows = array(); foreach ($tasks as $task) { $rows[] = array( $task->getID(), $task->getTaskClass(), $task->getLeaseOwner(), $task->getLeaseExpires(), $task->getPriority(), $task->getFailureCount(), ); } $table = new AphrontTableView($rows); $table->setHeaders( array( 'ID', 'Class', 'Owner', 'Expries', 'Priority', 'Count', )); $panel = new AphrontPanelView(); $panel->setHeader('Tasks'); $panel->appendChild($table); return $this->buildStandardPageResponse( $panel, array( 'title' => 'Console', 'tab' => 'console', )); } }