mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 03:52:36 +02:00
* add mirror::GLOBAL_INTERVAL on app.ini * rename key to DEFAULT_INTERVAL * add key on default app.ini + move code
This commit is contained in:
1 parent
5448d29b2e
commit
fc68fb951c
3 files changed
+16
-2
No files matched your search
+2
-2
@@ -724,9 +724,9 @@ func MigrateRepository(u *User, opts MigrateRepoOptions) (*Repository, error) {
|
||||
if opts.IsMirror {
|
||||
if _, err = x.InsertOne(&Mirror{
|
||||
RepoID: repo.ID,
|
||||
Interval: 24,
|
||||
Interval: setting.Mirror.DefaultInterval,
|
||||
EnablePrune: true,
|
||||
NextUpdate: time.Now().Add(24 * time.Hour),
|
||||
NextUpdate: time.Now().Add(time.Duration(setting.Mirror.DefaultInterval) * time.Hour),
|
||||
}); err != nil {
|
||||
return repo, fmt.Errorf("InsertOne: %v", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user