refactor queue into a generator

refactor queue connection and polling into a generator object that filters results and sleeps between queue calls, simplifying the main loop.

also removes an uneccessary sys.exit() that was causing shove to bail after a single task was completed.