mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-19 03:46:10 +08:00
fix: Fix the problem of unfiltered types in the backup database of cr… (#8896)
…onjob
This commit is contained in:
parent
a9e8c79e09
commit
a7ec06e066
1 changed files with 3 additions and 2 deletions
|
@ -309,12 +309,13 @@ func loadDbsForJob(cronjob model.Cronjob) []DatabaseHelper {
|
||||||
var dbs []DatabaseHelper
|
var dbs []DatabaseHelper
|
||||||
if cronjob.DBName == "all" {
|
if cronjob.DBName == "all" {
|
||||||
if cronjob.DBType == "mysql" || cronjob.DBType == "mariadb" {
|
if cronjob.DBType == "mysql" || cronjob.DBType == "mariadb" {
|
||||||
mysqlItems, _ := mysqlRepo.List()
|
databaseService := NewIDatabaseService()
|
||||||
|
mysqlItems, _ := databaseService.LoadItems(cronjob.DBType)
|
||||||
for _, mysql := range mysqlItems {
|
for _, mysql := range mysqlItems {
|
||||||
dbs = append(dbs, DatabaseHelper{
|
dbs = append(dbs, DatabaseHelper{
|
||||||
ID: mysql.ID,
|
ID: mysql.ID,
|
||||||
DBType: cronjob.DBType,
|
DBType: cronjob.DBType,
|
||||||
Database: mysql.MysqlName,
|
Database: mysql.Name,
|
||||||
Name: mysql.Name,
|
Name: mysql.Name,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue