aboutsummaryrefslogtreecommitdiffstats
path: root/services/mirror
diff options
context:
space:
mode:
Diffstat (limited to 'services/mirror')
-rw-r--r--services/mirror/mirror.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/services/mirror/mirror.go b/services/mirror/mirror.go
index 7c3d0d2239..a2acb6f363 100644
--- a/services/mirror/mirror.go
+++ b/services/mirror/mirror.go
@@ -8,6 +8,7 @@ import (
"context"
"fmt"
"net/url"
+ "strconv"
"strings"
"time"
@@ -22,8 +23,6 @@ import (
"code.gitea.io/gitea/modules/sync"
"code.gitea.io/gitea/modules/timeutil"
"code.gitea.io/gitea/modules/util"
-
- "github.com/unknwon/com"
)
// mirrorQueue holds an UniqueQueue object of the mirror
@@ -396,11 +395,11 @@ func syncMirror(repoID string) {
}()
mirrorQueue.Remove(repoID)
- m, err := models.GetMirrorByRepoID(com.StrTo(repoID).MustInt64())
+ id, _ := strconv.ParseInt(repoID, 10, 64)
+ m, err := models.GetMirrorByRepoID(id)
if err != nil {
log.Error("GetMirrorByRepoID [%s]: %v", repoID, err)
return
-
}
log.Trace("SyncMirrors [repo: %-v]: Running Sync", m.Repo)