We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84aa20e commit a81ad70Copy full SHA for a81ad70
action/editcommit.php
@@ -182,6 +182,9 @@ public function handlePeriodicPull(Event &$event, $param)
182
183
//if it is time to run a pull request
184
if ($lastPull + $timeToWait < $now) {
185
+ // Throttle by last attempt, not just last success, to avoid retrying
186
+ // on every HTTP request while the remote is unavailable.
187
+ file_put_contents($lastPullFile, serialize($now));
188
try {
189
$repo = $this->initRepo();
190
if ($enableIndexUpdate) {
@@ -225,9 +228,6 @@ public function handlePeriodicPull(Event &$event, $param)
225
228
}
226
229
return;
227
230
-
- //save the current time to the file to track the last pull execution
- file_put_contents($lastPullFile, serialize(time()));
231
232
233
0 commit comments