ADD sync repo time print log

This commit is contained in:
Jasder
2021-01-20 09:38:11 +08:00
parent efa99e0f06
commit f3d4f437cb
2 changed files with 2 additions and 2 deletions

View File

@@ -11,9 +11,9 @@ class SyncRepoUpdateTimeJob < ApplicationJob
private
def gitea_repo_updated_at(project)
admin = User.where(admin: true).select(:id, :gitea_token, :gitea_uid).last
puts "########## project id: #{project.id}"
return nil if project.gpid.blank?
result = Gitea::Repository::GetByIdService.call(project.gpid, admin.gitea_token)
result[:status] === :success ? result[:body]['updated_at'] : nil