mirror of
https://github.com/ManyakRus/starter.git
synced 2025-11-25 23:02:22 +02:00
сделал LogInfo_Connected(err)
This commit is contained in:
@@ -109,6 +109,11 @@ func Connect_WithApplicationName_err(ApplicationName string) error {
|
|||||||
FillSettings()
|
FillSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if contextmain.GetContext().Err() != nil {
|
||||||
|
return contextmain.GetContext().Err()
|
||||||
|
}
|
||||||
|
|
||||||
//get the database connection URL.
|
//get the database connection URL.
|
||||||
dsn := GetDSN(ApplicationName)
|
dsn := GetDSN(ApplicationName)
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,12 @@ func Connect_WithApplicationName_err(ApplicationName string) error {
|
|||||||
FillSettings()
|
FillSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
//ctxMain := context.Background()
|
//
|
||||||
|
if contextmain.GetContext().Err() != nil {
|
||||||
|
return contextmain.GetContext().Err()
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
ctxMain := contextmain.GetContext()
|
ctxMain := contextmain.GetContext()
|
||||||
ctx, cancel := context.WithTimeout(ctxMain, 60*time.Second)
|
ctx, cancel := context.WithTimeout(ctxMain, 60*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|||||||
Reference in New Issue
Block a user