QueueManagedJob sortEntities added so that the Entities for which the manager is available go first
manager passed as None attribute in Entity