Page MenuHomePhabricator

D19412.diff
No OneTemporary

D19412.diff

diff --git a/src/applications/harbormaster/worker/HarbormasterTargetWorker.php b/src/applications/harbormaster/worker/HarbormasterTargetWorker.php
--- a/src/applications/harbormaster/worker/HarbormasterTargetWorker.php
+++ b/src/applications/harbormaster/worker/HarbormasterTargetWorker.php
@@ -46,7 +46,13 @@
$build = $target->getBuild();
$viewer = $this->getViewer();
- $target->setDateStarted(time());
+ // If this is the first time we're starting work on this target, mark the
+ // current time as the start time. If the target yields or waits, we may
+ // end up here again later, so we don't want to overwrite the start time if
+ // we already have a value.
+ if (!$target->getDateStarted()) {
+ $target->setDateStarted(PhabricatorTime::getNow());
+ }
try {
if ($target->getBuildGeneration() !== $build->getBuildGeneration()) {

File Metadata

Mime Type
text/plain
Expires
Mon, May 20, 5:34 AM (2 w, 12 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6278103
Default Alt Text
D19412.diff (887 B)

Event Timeline