mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-07-16 23:18:56 +08:00
增加上链操作及修改webhook
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
class ProjectCreateChainJob < ApplicationJob
|
||||
queue_as :default
|
||||
|
||||
def perform(owner_login, reponame)
|
||||
status = 0
|
||||
|
||||
5.times do |i|
|
||||
if status == 200
|
||||
Rails.logger.info("########_repository__#{reponame}______create_chain_success__try:_#{i+1}_")
|
||||
break
|
||||
else
|
||||
Rails.logger.info("########_repository__#{reponame}______start_to_create_chain__try:_#{i+1}_")
|
||||
create_chain = system("chain trustieCreate #{owner_login} #{reponame}")
|
||||
status = create_chain[:status].to_i
|
||||
Rails.logger.info("########_repository__#{reponame}__create_chain:___#{create_chain}____failed_to_create_chain__")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user