Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: call system gc once instead of after each job cleanup itera…
…tion When cleaning up a namespace, we previously: - purged the ignorable jobs - called system gc - called namespace deletion This was performed for each namespace, causing more load on Nomad as it called GC potentially dozens of times. Instead, we now purged all the ignorable jobs in each namespace, _then_ call system gc, and finally delete all the underlying namespaces. This should cause less stress on the nomad cluster. Additionally, if no jobs are found for a deletable namespace, skip the deletion logic completely (which makes the log output a bit cleaner).
- Loading branch information