Supporto DB per la coda.
Start adding support for queues.
Bad hack to preserve selection in queues.