I have a Firebase Queue with ~300k tasks in it. I construct it like so:
const db = getDatabase()
const scrapeQueueRef = db.ref('/queue/taskQueue')
const queue = new Queue(scrapeQueueRef, (data, progress, resolve, reject) => {
// do things
resolve()
})
I think the new Queue
call is downloading the entire node and keeping it in-memory as workers complete tasks (based on database bandwidth measurements).
Since it's already in memory, is there a way to access the number of tasks remaining in the queue? I'm hoping to avoid re-downloading the entire node with a call to scrapeQueueRef.once()
, but I'd like to add # tasks remaining to my logs.