Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/537/head
zouap 3 years ago
parent
commit
e1492c5431
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      routers/repo/user_data_analysis.go

+ 9
- 3
routers/repo/user_data_analysis.go View File

@@ -22,6 +22,14 @@ func TimeingCountData() {
log.Error("wiki not exist. wikiPath=" + wikiPath) log.Error("wiki not exist. wikiPath=" + wikiPath)
} else { } else {
log.Info("wiki exist, wikiPath=" + wikiPath) log.Info("wiki exist, wikiPath=" + wikiPath)

lastCommit, _ := wikiRepo.GetBranchCommit("master")
lastCommitObj, err := json.Marshal(lastCommit)
if err != nil {
log.Error("convert to json error.")
} else {
log.Info("json=" + string(lastCommitObj))
}
entries, err := commit.ListEntries() entries, err := commit.ListEntries()
if err != nil { if err != nil {
if wikiRepo != nil { if wikiRepo != nil {
@@ -35,12 +43,10 @@ func TimeingCountData() {
} }
wikiName, err := wiki_service.FilenameToName(entry.Name()) wikiName, err := wiki_service.FilenameToName(entry.Name())
if err != nil { if err != nil {
if models.IsErrWikiInvalidFileName(err) {
continue
}
if wikiRepo != nil { if wikiRepo != nil {
wikiRepo.Close() wikiRepo.Close()
} }
continue
} else if wikiName == "_Sidebar" || wikiName == "_Footer" { } else if wikiName == "_Sidebar" || wikiName == "_Footer" {
continue continue
} }


Loading…
Cancel
Save