gitlink-forgeplus/app/tasks/create_mirror_take.rb

14 lines
588 B
Ruby
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

class CreateMirrorRake
# 运行示例: 检查哪些项目的repo不存在bundle exec rails runner "CreateMirrorRake.new.call()"
def call
SyncLog.sync_log("=====begin to create mirror======")
empty_repo = []
all_projects = Project.select(:id,:identifier,:user_id, :gpid, :forked_count,:is_public).includes(:owner, :repository)
all_projects.each do |project|
SyncLog.sync_log("=====check_project_id:#{project.id}======")
CheckMirrorJob.perform_later(project)
end
SyncLog.sync_log("=====completed_response======")
end
end