klesh commented on code in PR #6258:
URL:
https://github.com/apache/incubator-devlake/pull/6258#discussion_r1361460326
##########
backend/core/runner/db.go:
##########
@@ -160,15 +160,33 @@ func getDbConnection(dbUrl string, conf *gorm.Config)
(*gorm.DB, error) {
}
func CheckDbConnection(dbUrl string, d time.Duration) errors.Error {
- db, err := getDbConnection(dbUrl, &gorm.Config{})
- if err != nil {
- return errors.Convert(err)
- }
ctx := context.Background()
- if d > 0 {
- var cancel context.CancelFunc
- ctx, cancel = context.WithTimeout(context.Background(), d)
- defer cancel()
+
+ result := make(chan errors.Error, 1)
+ done := make(chan struct{}, 1)
+ go func() {
+ db, err := getDbConnection(dbUrl, &gorm.Config{})
+ if err != nil {
+ result <- errors.Convert(err)
+ }
+ if d > 0 {
+ fmt.Println("yyy")
Review Comment:
Please delete this line
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]