chore: add test configurations before running in scheduled mode

This commit is contained in:
Jonas Kaninda
2024-09-29 07:35:27 +02:00
parent fdc88e6064
commit 1722ee0eeb
2 changed files with 5 additions and 2 deletions

View File

@@ -44,7 +44,10 @@ func scheduledMode(db *dbConfig, config *BackupConfig) {
//Test database connexion //Test database connexion
testDatabaseConnection(db) testDatabaseConnection(db)
//Test backup
utils.Info("Testing backup configurations...")
BackupTask(db, config)
utils.Info("Testing backup configurations...done")
utils.Info("Creating backup job...") utils.Info("Creating backup job...")
// Create a new cron instance // Create a new cron instance
c := cron.New() c := cron.New()

View File

@@ -127,5 +127,5 @@ func testDatabaseConnection(db *dbConfig) {
} }
func intro() { func intro() {
utils.Info("Starting MySQL Backup...") utils.Info("Starting MySQL Backup...")
utils.Info("Copyright © 2024 Jonas Kaninda ") utils.Info("Copyright (c) 2024 Jonas Kaninda ")
} }