Skip to content

Commit 847272a

Browse files
cez81lafriks
authored andcommitted
Only update mirror last update after successful sync (#2730)
1 parent 30afce1 commit 847272a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

models/repo_mirror.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func (m *Mirror) BeforeInsert() {
5050
// BeforeUpdate is invoked from XORM before updating this object.
5151
func (m *Mirror) BeforeUpdate() {
5252
if m != nil {
53-
m.UpdatedUnix = time.Now().Unix()
53+
m.UpdatedUnix = m.Updated.Unix()
5454
m.NextUpdateUnix = m.NextUpdate.Unix()
5555
}
5656
}
@@ -179,6 +179,7 @@ func (m *Mirror) runSync() bool {
179179
}
180180
}
181181

182+
m.Updated = time.Now()
182183
return true
183184
}
184185

0 commit comments

Comments
 (0)