Moved logic from queue workers to base class