What was supposed to be done with the timeout variable "tOut"?
As long as I see here the variables gets assigned but not used.
Shall I clean up and delete code that relates to "tOut"?
backends/p_guerrilla_db_redis.go
func (g *GuerrillaDBAndRedisBackend) sqlConnect() (*sql.DB, error) {
tOut := GuerrillaDBAndRedisBatchTimeout
if g.config.BatchTimeout > 0 {
tOut = time.Duration(g.config.BatchTimeout)
}
tOut += 10
// don't go to 30 sec or more
if tOut >= 30 {
tOut = 29
}
if db, err := sql.Open(g.config.Driver, g.config.DSN); err != nil {
Log().Error("cannot open database", err, "]")
return nil, err
} else {
// do we have access?
_, err = db.Query("SELECT mail_id FROM " + g.config.Table + " LIMIT 1")
if err != nil {
Log().Error("cannot select table:", err)
return nil, err
}
return db, nil
}
}
What was supposed to be done with the timeout variable "tOut"? As long as I see here the variables gets assigned but not used. Shall I clean up and delete code that relates to "tOut"?
backends/p_guerrilla_db_redis.go