Skip to content

Commit

Permalink
add todo
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackie Li committed Jul 1, 2019
1 parent ee2b034 commit 1363896
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func New(redisDSN string) (*Process, error) {
worker := server.NewWorker("worker0", runtime.NumCPU())
worker.LaunchAsync(errChan)

// TODO: use redis pool
redisConn, err := redis.Dial("tcp", strings.Replace(redisDSN, "redis://", "", -1))
if err != nil {
return nil, errors.Wrap(err, "init new process")
Expand Down Expand Up @@ -211,6 +212,7 @@ type JobQuery struct {
// OpenJobQuery returns a new job query
func OpenJobQuery(redisDSN string) (*JobQuery, error) {
host := strings.Replace(redisDSN, "redis://", "", -1)
// TODO: use redis pool
redisConn, err := redis.Dial("tcp", host)
if err != nil {
return nil, err
Expand Down

0 comments on commit 1363896

Please sign in to comment.