summaryrefslogtreecommitdiffstats
path: root/modules/indexer
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-02-12 18:12:27 +0800
committerGitHub <noreply@github.com>2020-02-12 18:12:27 +0800
commit3d69bbd58f1214325b9133caa439a09ba952ed30 (patch)
tree217746d1805755b639fce8dfed6fe007429dc368 /modules/indexer
parent83a8944fcf64af9bf5b0a4e233f9a7f917838a4d (diff)
downloadgitea-3d69bbd58f1214325b9133caa439a09ba952ed30.tar.gz
gitea-3d69bbd58f1214325b9133caa439a09ba952ed30.zip
Fix queue pop error and stat empty repository error (#10248)
* Fix queue pop error and stat empty repository error * Fix error
Diffstat (limited to 'modules/indexer')
-rw-r--r--modules/indexer/stats/db.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/indexer/stats/db.go b/modules/indexer/stats/db.go
index fe219b443f..6e10ee2052 100644
--- a/modules/indexer/stats/db.go
+++ b/modules/indexer/stats/db.go
@@ -19,6 +19,10 @@ func (db *DBIndexer) Index(id int64) error {
if err != nil {
return err
}
+ if repo.IsEmpty {
+ return nil
+ }
+
status, err := repo.GetIndexerStatus(models.RepoIndexerTypeStats)
if err != nil {
return err