diff --git a/apps/ops/celery/logger.py b/apps/ops/celery/logger.py index bfe713d6d..1dd517200 100644 --- a/apps/ops/celery/logger.py +++ b/apps/ops/celery/logger.py @@ -143,7 +143,7 @@ class CeleryTaskFileHandler(CeleryTaskLoggerHandler): def emit(self, record): msg = self.format(record) - if not self.f: + if not self.f or self.f.closed: return self.f.write(msg) self.f.write(self.terminator)