From 1c73e982ba555e81dd2e82152816924b1e1a468c Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Wed, 13 May 2020 11:27:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0chain=5Fparams=E7=9A=84log?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/jobs/project_create_chain_job.rb | 6 ++++-- app/services/repositories/create_service.rb | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/jobs/project_create_chain_job.rb b/app/jobs/project_create_chain_job.rb index 93590cf5a..6d9d837f7 100644 --- a/app/jobs/project_create_chain_job.rb +++ b/app/jobs/project_create_chain_job.rb @@ -2,11 +2,13 @@ class ProjectCreateChainJob < ApplicationJob queue_as :default def perform(chain_params) + Rails.logger.info("########_response_chain_params_22222_#{chain_params}__") status = 0 chain_type = chain_params[:type].to_s reponame = chain_params[:reponame] - Rails.logger.info("########_response_chain_type__#{chain_type}__") - + + Rails.logger.info("########_response_chain_chain_type_#{chain_type}__") + Rails.logger.info("########_response_reponame_#{reponame}__") 5.times do |i| if status == 200 diff --git a/app/services/repositories/create_service.rb b/app/services/repositories/create_service.rb index 5d9feda92..e206acd4e 100644 --- a/app/services/repositories/create_service.rb +++ b/app/services/repositories/create_service.rb @@ -31,6 +31,8 @@ class Repositories::CreateService < ApplicationService ownername: user.try(:login), reponame: @repository.try(:id) } + Rails.logger.info("########_response_chain_params_111111_#{chain_params}__") + ProjectCreateChainJob.perform_later(chain_params) #创建上链操作 #暂时gitea的hook功能未完善 #Gitea::Repository::Hooks::CreateService.new(user, @repository.try(:identifier), hook_params).call #创建gitea的hook功能