redis / redis/node-redis

Redis methods callback not working.

Open
#2,034 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help-wanted
Dominant language
TypeScript
Stars
17.6k
Forks
2k
Avg merge
2d 3h
Merged PRs (30d)
40

Description

Moved from: https://github.com/RediSearch/RediSearch/issues/2652
@Tarun-sngh

It seems like my callback is not hitting, am not getting any output on my console.
can you please look into it and let me know if there is any issue in my code or what .

Node version am using : 4.0.4
My code:

function getUserProfile(userId, cb) {
    let redis = redisConnect();
    redis.hGetAll( userId, cb);
}

getUserProfile("teams:91, (err, results) => {
    if(err){
        console.log(err);
    }
    console.log(results);
})

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided getUserProfile snippet and its hGetAll callback call; reproduce the behavior using Node 4.0.4 and inspect whether the callback is invoked. Compare the observed behavior with the Redis client API, then document the cause and a working callback example.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs, redis
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.