| |
@@ -180,7 +180,7 @@
|
| |
def _setup_resultdir_and_logging(self):
|
| |
""" Prepare the result directory and log file ASAP """
|
| |
self._prepare_result_directory(self.job)
|
| |
- handler = logging.handlers.WatchedFileHandler(
|
| |
+ handler = logging.FileHandler(
|
| |
filename=self.job.backend_log,
|
| |
)
|
| |
handler.setLevel(logging.INFO)
|
| |
WatchedFileHandler isn't appropriate choice, that's not what we actually
need. But more importantly, it even caused problems on build cancel:
(including the backend.log)
backend.log file because we don't only remove the log file, but whole
directory.
Where WatchedFileHandler failed before to re-create the file, we simply
ignore the unlink()ed file problem and keep writing into the opened file
descriptor.
As a consequence, because of unexpected error in logging, we did not
even release the allocated VM before (so tickets were kept open, and
resources UP, and unused).