aboutsummaryrefslogtreecommitdiffstats
path: root/models/repo_mirror.go
diff options
context:
space:
mode:
authorJonas Bröms <cez81@users.noreply.github.com>2017-10-18 20:50:41 +0200
committerLauris BH <lauris@nix.lv>2017-10-18 21:50:41 +0300
commit847272a70d403178db6e3595aa162a3710be5bc8 (patch)
tree47fd25789c918e5c870769f1a479354f17b7fe25 /models/repo_mirror.go
parent30afce1523ae4e03fcb831a051665c7008c443b3 (diff)
downloadgitea-847272a70d403178db6e3595aa162a3710be5bc8.tar.gz
gitea-847272a70d403178db6e3595aa162a3710be5bc8.zip
Only update mirror last update after successful sync (#2730)
Diffstat (limited to 'models/repo_mirror.go')
-rw-r--r--models/repo_mirror.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/repo_mirror.go b/models/repo_mirror.go
index 6419c0ba17..77cd98faa8 100644
--- a/models/repo_mirror.go
+++ b/models/repo_mirror.go
@@ -50,7 +50,7 @@ func (m *Mirror) BeforeInsert() {
// BeforeUpdate is invoked from XORM before updating this object.
func (m *Mirror) BeforeUpdate() {
if m != nil {
- m.UpdatedUnix = time.Now().Unix()
+ m.UpdatedUnix = m.Updated.Unix()
m.NextUpdateUnix = m.NextUpdate.Unix()
}
}
@@ -179,6 +179,7 @@ func (m *Mirror) runSync() bool {
}
}
+ m.Updated = time.Now()
return true
}