Record which cluster host received a push
Summary: Ref T4292. When we write a push log, also log which node received the request.
Test Plan: {F1230467}
Reviewers: chad
Reviewed By: chad
Maniphest Tasks: T4292
Differential Revision: https://secure.phabricator.com/D15759
This commit is contained in:
@@ -1058,8 +1058,16 @@ final class DiffusionCommitHookEngine extends Phobject {
|
||||
// up.
|
||||
$phid = id(new PhabricatorRepositoryPushLog())->generatePHID();
|
||||
|
||||
$device = AlmanacKeys::getLiveDevice();
|
||||
if ($device) {
|
||||
$device_phid = $device->getPHID();
|
||||
} else {
|
||||
$device_phid = null;
|
||||
}
|
||||
|
||||
return PhabricatorRepositoryPushLog::initializeNewLog($this->getViewer())
|
||||
->setPHID($phid)
|
||||
->setDevicePHID($device_phid)
|
||||
->setRepositoryPHID($this->getRepository()->getPHID())
|
||||
->attachRepository($this->getRepository())
|
||||
->setEpoch(time());
|
||||
|
||||
Reference in New Issue
Block a user