Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions action/editcommit.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ public function handlePeriodicPull(Event &$event, $param)

//if it is time to run a pull request
if ($lastPull + $timeToWait < $now) {
// Throttle by last attempt, not just last success, to avoid retrying
// on every HTTP request while the remote is unavailable.
file_put_contents($lastPullFile, serialize($now));
try {
$repo = $this->initRepo();
if ($enableIndexUpdate) {
Expand Down Expand Up @@ -225,9 +228,6 @@ public function handlePeriodicPull(Event &$event, $param)
}
return;
}

//save the current time to the file to track the last pull execution
file_put_contents($lastPullFile, serialize(time()));
}
}
}
Expand Down
Loading