Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15397540
D7998.id18096.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7998.id18096.diff
View Options
Index: src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php
===================================================================
--- src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php
+++ src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php
@@ -87,9 +87,7 @@
// If any repositories have the NEEDS_UPDATE flag set, pull them
// as soon as possible.
- $type_need_update = PhabricatorRepositoryStatusMessage::TYPE_NEEDS_UPDATE;
- $need_update_messages = id(new PhabricatorRepositoryStatusMessage())
- ->loadAllWhere('statusType = %s', $type_need_update);
+ $need_update_messages = $this->loadRepositoryUpdateMessages();
foreach ($need_update_messages as $message) {
$retry_after[$message->getRepositoryID()] = time();
}
@@ -184,10 +182,20 @@
$sleep_until = time() + $min_sleep;
}
- $this->sleep($sleep_until - time());
+ while (($sleep_until - time()) > 0) {
+ $this->sleep(1);
+ if ($this->loadRepositoryUpdateMessages()) {
+ break;
+ }
+ }
}
}
+ private function loadRepositoryUpdateMessages() {
+ $type_need_update = PhabricatorRepositoryStatusMessage::TYPE_NEEDS_UPDATE;
+ return id(new PhabricatorRepositoryStatusMessage())
+ ->loadAllWhere('statusType = %s', $type_need_update);
+ }
/**
* @task pull
Index: src/applications/repository/engine/PhabricatorRepositoryEngine.php
===================================================================
--- src/applications/repository/engine/PhabricatorRepositoryEngine.php
+++ src/applications/repository/engine/PhabricatorRepositoryEngine.php
@@ -54,7 +54,7 @@
if ($this->getVerbose()) {
$console = PhutilConsole::getConsole();
$argv = func_get_args();
- $argv[0] = $argv[0]."\n";
+ array_unshift($argv, "%s\n");
call_user_func_array(array($console, 'writeOut'), $argv);
}
return $this;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 17, 8:55 PM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7229511
Default Alt Text
D7998.id18096.diff (1 KB)
Attached To
Mode
D7998: Reduce parse latency for changes pushed to hosted repositories
Attached
Detach File
Event Timeline
Log In to Comment