Skip to content

Commit 1e3ac5f

Browse files
committed
randomize updates
1 parent 09f5e71 commit 1e3ac5f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

hooks/pluginable.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ function update_plugins() {
572572

573573
// Do a force reset on the repo to avoid merge conflicts, and obtain found latest version
574574
$cmd = 'cd ' . $subfolder . ' && git reset --hard';
575+
$cmd .= ' && sleep ' . mt_rand(1, 60); // Random sleep to avoid git rate limiting
575576
$cmd .= ' && git clean -f -d';
576577
$cmd .= ' && git fetch --all';
577578
$cmd .= ' && git clone --depth 1 --branch "' . $latest_version . '" ' . $url . ' 2>/dev/null';

0 commit comments

Comments
 (0)