From a7ec06e06601f72a4ac8ffb21ac1ce6bd6e0971b Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Tue, 3 Jun 2025 17:12:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Fix=20the=20problem=20of=20unfiltered=20?= =?UTF-8?q?types=20in=20the=20backup=20database=20of=20cr=E2=80=A6=20(#889?= =?UTF-8?q?6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …onjob --- agent/app/service/cronjob_backup.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/agent/app/service/cronjob_backup.go b/agent/app/service/cronjob_backup.go index 99a72e1eb..33b530d76 100644 --- a/agent/app/service/cronjob_backup.go +++ b/agent/app/service/cronjob_backup.go @@ -309,12 +309,13 @@ func loadDbsForJob(cronjob model.Cronjob) []DatabaseHelper { var dbs []DatabaseHelper if cronjob.DBName == "all" { if cronjob.DBType == "mysql" || cronjob.DBType == "mariadb" { - mysqlItems, _ := mysqlRepo.List() + databaseService := NewIDatabaseService() + mysqlItems, _ := databaseService.LoadItems(cronjob.DBType) for _, mysql := range mysqlItems { dbs = append(dbs, DatabaseHelper{ ID: mysql.ID, DBType: cronjob.DBType, - Database: mysql.MysqlName, + Database: mysql.Name, Name: mysql.Name, }) }