fixed duplicate records bug. It was running mutiple rest calls faster than it could clear the queue