From f71a35916b3a890ecc54d7c5a0462aac60947c45 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 15 May 2024 12:56:46 -0300 Subject: [PATCH] fix: esperar para correr bundler varias veces #16282 --- app/models/site.rb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/models/site.rb b/app/models/site.rb index d47a8e50..377c6b35 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -577,14 +577,18 @@ class Site < ApplicationRecord def install_gems return unless persisted? - deploy_local = deploys.find_by_type('DeployLocal') - deploy_local.git_lfs + Site.one_at_a_time.synchronize do + deploy_local = deploys.find_by_type('DeployLocal') + deploy_local.git_lfs + end return unless !gems_installed? || gemfile_updated? || gemfile_lock_updated? - deploy_local.bundle - touch - FileUtils.touch(gemfile_path) + Site.one_at_a_time.synchronize do + deploy_local.bundle + touch + FileUtils.touch(gemfile_path) + end end def gem_path