From 60857ed357db1178d006b79bf529182db4f23ea5 Mon Sep 17 00:00:00 2001 From: yystopf Date: Mon, 6 May 2024 17:29:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=EF=BC=9A=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=88=A4=E6=96=AD=E4=B8=BA=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/jobs/touch_sync_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/touch_sync_job.rb b/app/jobs/touch_sync_job.rb index d4c83be73..3beaf52e5 100644 --- a/app/jobs/touch_sync_job.rb +++ b/app/jobs/touch_sync_job.rb @@ -14,7 +14,7 @@ class TouchSyncJob < ApplicationJob else result = Reposync::SyncBranchService.call(sync_repository.repo_name, touchable.external_branch_name, sync_repository.sync_direction) end - if result.is_a?(Array) + if result.is_a?(Array) && result[0].to_i == 0 touchable.update_attributes!({sync_status: 1, sync_time: Time.now}) else touchable.update_attributes!({sync_status: 2, sync_time: Time.now})