File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -538,6 +538,7 @@ public function update_core() {
538
538
* Update plugins from their given git repo.
539
539
*/
540
540
function update_plugins () {
541
+ sleep (mt_rand (1 , 30 )); // stagger actual update check
541
542
$ this ->log ( 'Running update plugins... ' );
542
543
$ pluginsDir = '/usr/local/hestia/plugins ' ;
543
544
$ subfolders = glob ( $ pluginsDir . '/* ' , GLOB_ONLYDIR );
@@ -572,7 +573,6 @@ function update_plugins() {
572
573
573
574
// Do a force reset on the repo to avoid merge conflicts, and obtain found latest version
574
575
$ cmd = 'cd ' . $ subfolder . ' && git reset --hard ' ;
575
- $ cmd .= ' && sleep ' . mt_rand (1 , 60 ); // Random sleep to avoid git rate limiting
576
576
$ cmd .= ' && git clean -f -d ' ;
577
577
$ cmd .= ' && git fetch --all ' ;
578
578
$ cmd .= ' && git clone --depth 1 --branch " ' . $ latest_version . '" ' . $ url . ' 2>/dev/null ' ;
You can’t perform that action at this time.
0 commit comments