Gearman queue process rewritten