summaryrefslogtreecommitdiffstats
path: root/models/repo_mirror.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo_mirror.go')
-rw-r--r--models/repo_mirror.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/models/repo_mirror.go b/models/repo_mirror.go
index 9801c05ae4..e1c1aefc39 100644
--- a/models/repo_mirror.go
+++ b/models/repo_mirror.go
@@ -318,6 +318,12 @@ func (m *Mirror) runSync() ([]*mirrorSyncResult, bool) {
return parseRemoteUpdateOutput(output), true
}
+// RunMirrorSync will invoke Mirror's runSync
+func RunMirrorSync(mirror *Mirror) bool {
+ _, ok := mirror.runSync()
+ return ok
+}
+
func getMirrorByRepoID(e Engine, repoID int64) (*Mirror, error) {
m := &Mirror{RepoID: repoID}
has, err := e.Get(m)