新增:同步时间和创建数据返回

This commit is contained in:
2024-04-16 17:53:35 +08:00
parent e358e3b6f6
commit 7271603248
6 changed files with 15 additions and 5 deletions

View File

@@ -15,9 +15,9 @@ class TouchSyncJob < ApplicationJob
result = Reposync::SyncBranchService.call(sync_repository.repo_name, touchable.external_branch_name, sync_repository.sync_direction)
end
if result.is_a?(Array)
touchable.update_column(:sync_status, 1)
touchable.update_attributes!({sync_status: 1, sync_time: Time.now})
else
touchable.update_column(:sync_status, 2)
touchable.update_attributes!({sync_status: 2, sync_time: Time.now})
end
end
end