diff --git a/lib/jqueue.py b/lib/jqueue.py index a5b2c85d4de2675ca0533eba6e70bf8373d3ba58..e8a2bd52547aadebcb5a92e71bba9ffa7f608bcc 100644 --- a/lib/jqueue.py +++ b/lib/jqueue.py @@ -436,18 +436,18 @@ class JobStorage(object): logging.debug("Writing job %s to %s", job.id, filename) utils.WriteFile(filename, data=serializer.DumpJson(job.Serialize(), indent=False)) - self._CleanCacheUnlocked(exceptions=[job.id]) + self._CleanCacheUnlocked([job.id]) - def _CleanCacheUnlocked(self, exceptions=None): + def _CleanCacheUnlocked(self, exclude): """Clean the memory cache. The exceptions argument contains job IDs that should not be cleaned. """ - assert isinstance(exceptions, list) + assert isinstance(exclude, list) for job in self._memcache.values(): - if job.id in exceptions: + if job.id in exclude: continue if job.GetStatus() not in (constants.JOB_STATUS_QUEUED, constants.JOB_STATUS_RUNNING):