Skip to content

Commit a7ec06e

Browse files
authored
fix: Fix the problem of unfiltered types in the backup database of cr… (#8896)
…onjob
1 parent a9e8c79 commit a7ec06e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

agent/app/service/cronjob_backup.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,12 +309,13 @@ func loadDbsForJob(cronjob model.Cronjob) []DatabaseHelper {
309309
var dbs []DatabaseHelper
310310
if cronjob.DBName == "all" {
311311
if cronjob.DBType == "mysql" || cronjob.DBType == "mariadb" {
312-
mysqlItems, _ := mysqlRepo.List()
312+
databaseService := NewIDatabaseService()
313+
mysqlItems, _ := databaseService.LoadItems(cronjob.DBType)
313314
for _, mysql := range mysqlItems {
314315
dbs = append(dbs, DatabaseHelper{
315316
ID: mysql.ID,
316317
DBType: cronjob.DBType,
317-
Database: mysql.MysqlName,
318+
Database: mysql.Name,
318319
Name: mysql.Name,
319320
})
320321
}

0 commit comments

Comments
 (0)