Prototype for ajax queue polling