mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-23 01:20:25 +08:00
feat: 实现数据库备份和恢复并发调度 (#84)
This commit is contained in:
@@ -94,7 +94,7 @@ func (repo *dbBinlogHistoryRepoImpl) InsertWithBinlogFiles(ctx context.Context,
|
||||
if len(binlogFiles) == 0 {
|
||||
return nil
|
||||
}
|
||||
histories := make([]*entity.DbBinlogHistory, 0, len(binlogFiles))
|
||||
histories := make([]any, 0, len(binlogFiles))
|
||||
for _, fileOnServer := range binlogFiles {
|
||||
if !fileOnServer.Downloaded {
|
||||
break
|
||||
@@ -115,7 +115,7 @@ func (repo *dbBinlogHistoryRepoImpl) InsertWithBinlogFiles(ctx context.Context,
|
||||
}
|
||||
}
|
||||
if len(histories) > 0 {
|
||||
if err := repo.Upsert(ctx, histories[len(histories)-1]); err != nil {
|
||||
if err := repo.Upsert(ctx, histories[len(histories)-1].(*entity.DbBinlogHistory)); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user