in smallpond/execution/scheduler.py [0:0]
def busy(self) -> bool:
return (
len(self.running_works) >= self.max_running_works
or (self.cpu_count > 0 and self.allocated_cpus >= self.cpu_count)
or (self.gpu_count > 0 and self.allocated_gpus >= self.gpu_count)
or (self.memory_size > 0 and self.allocated_memory >= self.memory_size)
)