ADD sync repo time print log
This commit is contained in:
parent
efa99e0f06
commit
f3d4f437cb
|
@ -3106,7 +3106,7 @@ curl -X GET http://localhost:3000/api/trusite/trusite/readme | jq
|
||||||
```
|
```
|
||||||
---
|
---
|
||||||
|
|
||||||
#### 获取仓库仓库的语言百分占比
|
#### 获库仓库的语言百分占比
|
||||||
```
|
```
|
||||||
GET api/:owner/:repo/languages
|
GET api/:owner/:repo/languages
|
||||||
```
|
```
|
||||||
|
|
|
@ -11,9 +11,9 @@ class SyncRepoUpdateTimeJob < ApplicationJob
|
||||||
private
|
private
|
||||||
def gitea_repo_updated_at(project)
|
def gitea_repo_updated_at(project)
|
||||||
admin = User.where(admin: true).select(:id, :gitea_token, :gitea_uid).last
|
admin = User.where(admin: true).select(:id, :gitea_token, :gitea_uid).last
|
||||||
|
puts "########## project id: #{project.id}"
|
||||||
|
|
||||||
return nil if project.gpid.blank?
|
return nil if project.gpid.blank?
|
||||||
|
|
||||||
result = Gitea::Repository::GetByIdService.call(project.gpid, admin.gitea_token)
|
result = Gitea::Repository::GetByIdService.call(project.gpid, admin.gitea_token)
|
||||||
|
|
||||||
result[:status] === :success ? result[:body]['updated_at'] : nil
|
result[:status] === :success ? result[:body]['updated_at'] : nil
|
||||||
|
|
Loading…
Reference in New Issue