diff --git a/iceprod/server/plugins/condor.py b/iceprod/server/plugins/condor.py index 4652a039..6d5a2438 100644 --- a/iceprod/server/plugins/condor.py +++ b/iceprod/server/plugins/condor.py @@ -920,7 +920,7 @@ async def check_submit_dir(self): logger.debug('stat: %r', st) if stat.S_ISDIR(st.st_mode): empty = False - if job_active: + if not job_active: if st.st_mtime < job_clean_logs_time: logger.info('cleaning up submit dir %s', path) shutil.rmtree(path)