react-native-queue icon indicating copy to clipboard operation
react-native-queue copied to clipboard

Cannot use two queues intances

Open TeruyaHaroldo opened this issue 7 years ago • 2 comments

Hello,

I want to create 2 instancies of Queue, like:

const queue = await queueFactory(); const tempQueue = await queueFactory();

But the tempQueue is not working with tempQueue.start(), he do not call my jobs and not print anything in the log.console after I call queue.stop().

Is this a bug?

TeruyaHaroldo avatar Sep 03 '18 20:09 TeruyaHaroldo

+1

sutefan1 avatar Oct 23 '18 11:10 sutefan1

I'd have to double check but I would think this is due to the under lying realm database having a fixed name and hence file store. A second queue would try and connect to the same realm instance as the first, with obvious issues!

You could fork and make the ability to specify a realm name/file which would help you. Funnily enough, that seems to be baked in to the database file but not exposed through the queue options.

gruffT avatar Feb 15 '20 11:02 gruffT