mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 06:45:43 +03:00
Always try to fetch repo for mirrors (#19975)
- Always give a best-effort to fetching the repositories, if even that fails indeed give a disconnected mirror found error. - *Partially* resolves #19928 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
1f8f9c3826
commit
f0ce5470e5
1 changed files with 2 additions and 2 deletions
|
@ -63,7 +63,7 @@ func Update(ctx context.Context, pullLimit, pushLimit int) error {
|
||||||
var item SyncRequest
|
var item SyncRequest
|
||||||
var repo *repo_model.Repository
|
var repo *repo_model.Repository
|
||||||
if m, ok := bean.(*repo_model.Mirror); ok {
|
if m, ok := bean.(*repo_model.Mirror); ok {
|
||||||
if m.Repo == nil {
|
if m.GetRepository() == nil {
|
||||||
log.Error("Disconnected mirror found: %d", m.ID)
|
log.Error("Disconnected mirror found: %d", m.ID)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ func Update(ctx context.Context, pullLimit, pushLimit int) error {
|
||||||
ReferenceID: m.RepoID,
|
ReferenceID: m.RepoID,
|
||||||
}
|
}
|
||||||
} else if m, ok := bean.(*repo_model.PushMirror); ok {
|
} else if m, ok := bean.(*repo_model.PushMirror); ok {
|
||||||
if m.Repo == nil {
|
if m.GetRepository() == nil {
|
||||||
log.Error("Disconnected push-mirror found: %d", m.ID)
|
log.Error("Disconnected push-mirror found: %d", m.ID)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue