getQueue = limit => {
  if (!queue) {
    queue = new Queue(pushToQueue, {
      id: `url`,
      merge: (old, _, cb) => cb(old),
      concurrent: limit || 100,
    })
    // when the queue is empty we stop the progressbar
    queue.on(`drain`, async () => {
      if (awaitingCreateRemoteFileNodePromise) {
        return
      }

      awaitingCreateRemoteFileNodePromise = true
      await remoteFileDownloaderBarPromise
      awaitingCreateRemoteFileNodePromise = false

      if (bar) {
        // this is to give us a little time to wait and see if there
        // will be more jobs added with a break between
        // sometimes the queue empties but then is recreated within 2 secs
        doneQueueTimeout = setTimeout(() => {
          bar.done()
          totalJobs = 0
        }, 2000)
      }
    })
  }
  return queue
}
Queue
Use the task's url as the id
When pushing a task with a similar id, prefer the original task
as it's already in the processing cache