From 5af5219f971674205d39a4bd38f79d82bc94c62d Mon Sep 17 00:00:00 2001 From: yystopf Date: Thu, 25 Apr 2024 15:41:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E4=BB=93=E5=BA=93=E5=BB=B6=E8=BF=9F=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/v1/projects/sync_repositories_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/projects/sync_repositories_controller.rb b/app/controllers/api/v1/projects/sync_repositories_controller.rb index 08956eec..c12e2206 100644 --- a/app/controllers/api/v1/projects/sync_repositories_controller.rb +++ b/app/controllers/api/v1/projects/sync_repositories_controller.rb @@ -58,7 +58,7 @@ class Api::V1::Projects::SyncRepositoriesController < Api::V1::BaseController if @sync_repository_branches.update_all({enable: params[:enable]}) @sync_repository_branches.each do |branch| branch_sync_direction = branch&.sync_repository&.sync_direction.to_i - TouchSyncJob.perform_later(branch) if params[:enable] && branch_sync_direction == params[:first_sync_direction].to_i + TouchSyncJob.set(wait: 5.seconds).perform_later(branch) if params[:enable] && branch_sync_direction == params[:first_sync_direction].to_i if branch_sync_direction == 1 Reposync::UpdateBranchStatusService.call(branch&.sync_repository&.repo_name, branch.gitlink_branch_name, params[:enable]) else