ADD console info

This commit is contained in:
Jasder 2020-10-20 00:05:43 +08:00
parent 2f7b6c9b75
commit 46ccbbe699
1 changed files with 6 additions and 3 deletions

View File

@ -1,3 +1,6 @@
require 'uri'
require 'net/http'
class SyncEducoderShixunJob < ApplicationJob
queue_as :default
@ -9,7 +12,7 @@ class SyncEducoderShixunJob < ApplicationJob
result = JSON.parse(response.body)
if result['status'] != 0
logger.info "======= 接口请求失败!"
puts.info "======= 接口请求失败!"
return
end
@ -57,9 +60,9 @@ class SyncEducoderShixunJob < ApplicationJob
repo = Repository.new(repo_params)
repo.save!
logger.info "项目: #{re['name']} 同步成功"
puts.info "项目: #{re['name']} 同步成功"
else
logger.info "项目: #{re['name']} 同步失败"
puts.info "项目: #{re['name']} 同步失败"
end
end
end