Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15431827
D19412.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
887 B
Referenced Files
None
Subscribers
None
D19412.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 25, 2:44 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7623521
Default Alt Text
D19412.diff (887 B)
Attached To
Mode
D19412: Stop build target start times from being overwritten on reentry
Attached
Detach File
Event Timeline
Log In to Comment