redis-om-node icon indicating copy to clipboard operation
redis-om-node copied to clipboard

is INCRBY possible by using redis-om for the counter update?

Open shashijangir opened this issue 3 years ago • 0 comments

I am face some issue to update counter in redis-om. I use .save() to update data but multiple request is coming on same time and this counter value is not work properly. This is doing count only 1 if multple request is serving on same time.

           let mcData = await matchContestRepository.search()
            .where('contest_id').equals(contest_id)
            .and('match_id').equals(match_id).return.all() 


            mcData[0].joined_users += 1;
            let resposeData = await matchContestRepository.save(mcData[0]);

Can you suggest me how to implement this increment in redis-om for multiple request on same time.

shashijangir avatar Aug 09 '22 11:08 shashijangir