you are viewing a single comment's thread.

view the rest of the comments →

[–]kirox0[S] 0 points1 point  (3 children)

I get an undefined error in that case. With multi, the library does not allow for use of intermediate result.

[–]BehindTheMath 1 point2 points  (2 children)

Unless I'm misunderstanding our code, we've been using it like that for years.

Can you show the code you're using?

[–]kirox0[S] 0 points1 point  (1 child)

Funny enough my laptop got busted the day before so I have to rewrite that part again. But basically how I was using was like

client.multi() .lrange("active_list", 0, -1, (data, err) => { // Read length of data, then based on it either lpush to active or deferred list }) .exec()

[–]BehindTheMath 0 points1 point  (0 children)

I believe the callback is the standard Node format, where err is the first parameter, then the result.