From 8c1aedc6bd83196355ebdfa198f98c1639b21a02 Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Fri, 10 Jul 2020 15:54:04 +0800 Subject: [PATCH] change sync --- app/jobs/sync_projects_job.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/jobs/sync_projects_job.rb b/app/jobs/sync_projects_job.rb index 184f67dbd..f19993d6f 100644 --- a/app/jobs/sync_projects_job.rb +++ b/app/jobs/sync_projects_job.rb @@ -7,6 +7,7 @@ class SyncProjectsJob < ApplicationJob def perform(sync_params) SyncLog.sync_log.info("==========begin to sync #{sync_params[:type]} to forge============") begin + SyncLog.sync_log.info("=========request.subdomain: #{request.subdomain}============") gitea_main = "https://ucloudtest.trustie.net/" if request.subdomain === 'forgeplus' gitea_main = "https://trustie.net" @@ -24,6 +25,7 @@ class SyncProjectsJob < ApplicationJob response = http.send_request('GET', uri.path, sync_params, {'Content-Type' => 'application/json'}) if response.status == 200 target_jsons = response.body + SyncLog.sync_log.info("=========target_jsons: #{target_jsons}============") if target_jsons.present? && sync_params[:type] create_target(eval(target_jsons), sync_params[:type].to_s) end