Differential D9939 Diff 23890 src/applications/phrequent/conduit/ConduitAPI_phrequent_tracking_Method.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phrequent/conduit/ConduitAPI_phrequent_tracking_Method.php
Show All 25 Lines | final class ConduitAPI_phrequent_tracking_Method | ||||
} | } | ||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$user = $request->getUser(); | $user = $request->getUser(); | ||||
$times = id(new PhrequentUserTimeQuery()) | $times = id(new PhrequentUserTimeQuery()) | ||||
->setViewer($user) | ->setViewer($user) | ||||
->needPreemptingEvents(true) | ->needPreemptingEvents(true) | ||||
->withEnded(PhrequentUserTimeQuery::ENDED_NO) | |||||
hach-que: I think this is the cause of the 1 minute issue, because the calculations need to know about… | |||||
Not Done Inline ActionsActually removing this doesn't fix it (it just makes things worse). hach-que: Actually removing this doesn't fix it (it just makes things worse). | |||||
->withUserPHIDs(array($user->getPHID())) | ->withUserPHIDs(array($user->getPHID())) | ||||
->execute(); | ->execute(); | ||||
$now = time(); | $now = time(); | ||||
$results = id(new PhrequentTimeBlock($times)) | $results = id(new PhrequentTimeBlock($times)) | ||||
->getCurrentWorkStack($now); | ->getCurrentWorkStack($now); | ||||
return array('data' => $results); | return array('data' => $results); | ||||
} | } | ||||
} | } |
I think this is the cause of the 1 minute issue, because the calculations need to know about the stopped D8 entry.