This fixes #4898
Merge pull request #4990 from lucacopa/jobs_to_drain_sites

This fixes #4898