run_cnt += len(current_backups[t])
total_slots += max_jobs[t]
if len(candidates[t]) == 0:
- logger.info("No candidates for %s jobs", TYPES_COMPLETE_NAME[t])
+ logger.info("No candidates for %s(%s) jobs", t, TYPES_COMPLETE_NAME[t])
continue
free_slots = min(total_slots - run_cnt, total_free)
if free_slots <= 0:
- logger.info("No free slots for %s jobs but %d candidate(s)", TYPES_COMPLETE_NAME[t], len(candidates[t]))
+ logger.info("No free slots for %s(%s) jobs but %d candidate(s)", t, TYPES_COMPLETE_NAME[t], len(candidates[t]))
continue
- logger.info("Have %d candidate(s) and %d free slots for %s jobs.", len(candidates[t]), free_slots, TYPES_COMPLETE_NAME[t])
+ logger.info("Have %d candidate(s) and %d free slots for %s(%s) jobs.", len(candidates[t]), free_slots, t, TYPES_COMPLETE_NAME[t])
picked = random.sample(candidates[t], min(free_slots, len(candidates[t])))
for p in picked:
logger.info(" Will run: %s/%s", p['client'], p['level'])