mirror of
https://github.com/go-gitea/gitea
synced 2024-12-25 10:04:27 +00:00
parent
6d47b63be2
commit
a0f89ba8c7
@ -250,14 +250,13 @@ func migrateRepository(ctx context.Context, doer *user_model.User, downloader ba
|
|||||||
}
|
}
|
||||||
log.Warn("migrating milestones is not supported, ignored")
|
log.Warn("migrating milestones is not supported, ignored")
|
||||||
}
|
}
|
||||||
|
|
||||||
msBatchSize := uploader.MaxBatchInsertSize("milestone")
|
msBatchSize := uploader.MaxBatchInsertSize("milestone")
|
||||||
for len(milestones) > 0 {
|
for len(milestones) > 0 {
|
||||||
if len(milestones) < msBatchSize {
|
if len(milestones) < msBatchSize {
|
||||||
msBatchSize = len(milestones)
|
msBatchSize = len(milestones)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := uploader.CreateMilestones(milestones...); err != nil {
|
if err := uploader.CreateMilestones(milestones[:msBatchSize]...); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
milestones = milestones[msBatchSize:]
|
milestones = milestones[msBatchSize:]
|
||||||
|
Loading…
Reference in New Issue
Block a user