mirror of
https://github.com/jkaninda/mysql-bkup.git
synced 2025-12-06 21:49:40 +01:00
Merge pull request #143 from jkaninda/refactor
refactor: update logger, fix warning message
This commit is contained in:
@@ -96,7 +96,7 @@ func restoreFromRemote(db *dbConfig, conf *RestoreConfig) {
|
|||||||
}
|
}
|
||||||
err = sshStorage.CopyFrom(conf.file)
|
err = sshStorage.CopyFrom(conf.file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Fatal("Error copying backup file: %w", err)
|
utils.Fatal("Error copying backup file: %s", err)
|
||||||
}
|
}
|
||||||
RestoreDatabase(db, conf)
|
RestoreDatabase(db, conf)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ func CronNextTime(cronExpr string) time.Time {
|
|||||||
// Parse the cron expression
|
// Parse the cron expression
|
||||||
schedule, err := cron.ParseStandard(cronExpr)
|
schedule, err := cron.ParseStandard(cronExpr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Error("Error parsing cron expression:", err)
|
Error("Error parsing cron expression: %s", err)
|
||||||
return time.Time{}
|
return time.Time{}
|
||||||
}
|
}
|
||||||
// Get the current time
|
// Get the current time
|
||||||
|
|||||||
Reference in New Issue
Block a user