function cleanupQueues() {
  for (const [key, queue] of rest.pathQueues) {
    rest.eventHandlers.debug?.(
      "loop",
      "Running for of loop in cleanupQueues function.",
    );
    if (queue.length) continue;
    // REMOVE IT FROM CACHE
    rest.pathQueues.delete(key);
  }
  // NO QUEUE LEFT, DISABLE THE QUEUE
  if (!rest.pathQueues.size) rest.processingQueue = false;
}
/** Cleans up the queues by checking if there is nothing left and removing it. */
Cleans up the queues by checking if there is nothing left and removing it.
Cleans up the queues by checking if there is nothing left and removing it .
function cleanupQueues() {
  for (const [key, queue] of rest.pathQueues) {
    rest.eventHandlers.debug?.(
      "loop",
      "Running for of loop in cleanupQueues function.",
    );
    if (queue.length) continue;
    rest.pathQueues.delete(key);
  }
  if (!rest.pathQueues.size) rest.processingQueue = false;
}
function cleanupQueues ( ) { for ( const [ key , queue ] of rest . pathQueues ) { rest . eventHandlers . debug ?. ( "loop" , "Running for of loop in cleanupQueues function." , ) ; if ( queue . length ) continue ; rest . pathQueues . delete ( key ) ; } if ( ! rest . pathQueues . size ) rest . processingQueue = false ; }
Cleans up the queues by checking if there is nothing left and removing it.
Cleans up the queues by checking if there is nothing left and removing it .
// REMOVE IT FROM CACHE // NO QUEUE LEFT, DISABLE THE QUEUE