|
@@ -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 |
|
|
} |
|
|
} |
|
|