Unsure, there might be several ideas how to address it. Might be worth sleeping a night over it.
You might need an adaptive algorithm that ensures the queue not becoming infinitely long or empty as well .
Idk, you'll figure it out ;)