':param atomic_group: The AtomicGroup associated with this job that we
are using to set an upper bound on the threshold.
:return: The maximum number of HostQueueEntries assigned a Host before
this job can run.'

def _max_hosts_needed_to_run(self, atomic_group):

    return min(self._hosts_assigned_count(), atomic_group.max_number_of_machines)
