Chaged static sql instance to dynamic instance
This commit is contained in:
parent
6f95fedbc1
commit
a23791daa5
3 changed files with 8 additions and 14 deletions
|
|
@ -49,8 +49,7 @@ func (azure AzureFileStorage) upload(fileName string){
|
|||
ctx := context.Background()
|
||||
|
||||
fmt.Printf("[%s] Starting upload to Azure File Share...\n", strings.Trim(filepath.Base(fileName), ".bak"))
|
||||
//TODO Remove Hardcoded SQL Instance
|
||||
SQL.NewLogEntry(SQL.GetMariaDBInstance(), uuid.New(), SQL.LogInfo, filepath.Base(fileName), SQL.SQLStage_Upload, SQL.REMOTE_AZURE_FILE, "Starting upload.", time.Now())
|
||||
SQL.NewLogEntry(SQL.GetSQLInstance(), uuid.New(), SQL.LogInfo, filepath.Base(fileName), SQL.SQLStage_Upload, SQL.REMOTE_AZURE_FILE, "Starting upload.", time.Now())
|
||||
|
||||
err = azfile.UploadFileToAzureFile(ctx, file, fileURL,
|
||||
azfile.UploadToAzureFileOptions{
|
||||
|
|
@ -63,8 +62,7 @@ func (azure AzureFileStorage) upload(fileName string){
|
|||
}})
|
||||
|
||||
fmt.Printf("[%s] Upload finished.\n", strings.Trim(filepath.Base(fileName), ".bak"))
|
||||
//TODO Remove Hardcoded SQL Instance
|
||||
SQL.NewLogEntry(SQL.GetMariaDBInstance(), uuid.New(), SQL.LogInfo, filepath.Base(fileName), SQL.SQLStage_Upload, SQL.REMOTE_AZURE_FILE, "Finished upload.", time.Now())
|
||||
SQL.NewLogEntry(SQL.GetSQLInstance(), uuid.New(), SQL.LogInfo, filepath.Base(fileName), SQL.SQLStage_Upload, SQL.REMOTE_AZURE_FILE, "Finished upload.", time.Now())
|
||||
}
|
||||
|
||||
func readConfig() []byte {
|
||||
|
|
|
|||
Reference in a new issue