diff --git a/app/models/site.rb b/app/models/site.rb index 8f393f3a..cb351fcc 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -574,14 +574,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