jambonz / realtimedb-helpers

utility functions for querying jambonz redis database
0 stars 9 forks source link

fix listQueues #47

Closed avoylenko closed 1 year ago

avoylenko commented 1 year ago

This fixes listQueues method used by /Accounts/{AccountSid}/Queues endpoint. See https://github.com/jambonz/jambonz-api-server/blob/f3d3afee7332bdbd15ec28dfd0313d5a7489a62f/lib/routes/api/accounts.js#L904

xquanluu commented 1 year ago

Hi @avoylenko I love this a lot. I think you found great bug after we do advance queues. you are fixing this issue on https://github.com/jambonz/jambonz-api-server/blob/main/lib/routes/api/accounts.js#L898

As we created sorted-set folder here https://github.com/jambonz/realtimedb-helpers/tree/main/lib/sorted-set for supporting queue, As I don't know list API is being used by any other users or repo. let keep it backward compatible.

Could you please move that function to sorted-set folder and use that in api-server.

It would give us ability to revert back to list api for enqueue/dequeue if something wrong happens with sorted set.

avoylenko commented 1 year ago

Not sure that understood you correctly, are you saying that I should not touch lib/list-queues.js and instead we need another file with queue methods in /lib/sorted-set folder?

xquanluu commented 1 year ago

Yes, please don't touch to list queue, create new one in sorted set @avoylenko I'm sorry for my bad explaination ^^