Merge "Replace deprecated warn method"
This commit is contained in:
@@ -175,23 +175,23 @@ class ExecutorConductor(base.Conductor, metaclass=abc.ABCMeta):
|
||||
consume = False
|
||||
if self._log.isEnabledFor(logging.WARNING):
|
||||
if consume:
|
||||
self._log.warn(
|
||||
self._log.warning(
|
||||
"Job execution failed (consumption being"
|
||||
" skipped): %s [%s failures]", job, len(e))
|
||||
else:
|
||||
self._log.warn(
|
||||
self._log.warning(
|
||||
"Job execution failed (consumption"
|
||||
" proceeding): %s [%s failures]", job, len(e))
|
||||
# Show the failure/s + traceback (if possible)...
|
||||
for i, f in enumerate(e):
|
||||
self._log.warn("%s. %s", i + 1,
|
||||
f.pformat(traceback=True))
|
||||
self._log.warning("%s. %s", i + 1,
|
||||
f.pformat(traceback=True))
|
||||
except self.NO_CONSUME_EXCEPTIONS:
|
||||
self._log.warn("Job execution failed (consumption being"
|
||||
" skipped): %s", job, exc_info=True)
|
||||
self._log.warning("Job execution failed (consumption being"
|
||||
" skipped): %s", job, exc_info=True)
|
||||
consume = False
|
||||
except Exception:
|
||||
self._log.warn(
|
||||
self._log.warning(
|
||||
"Job execution failed (consumption proceeding): %s",
|
||||
job, exc_info=True)
|
||||
else:
|
||||
|
||||
@@ -383,8 +383,8 @@ class Request(Message):
|
||||
try:
|
||||
moved = self.transition(new_state)
|
||||
except excp.InvalidState:
|
||||
logger.warn("Failed to transition '%s' to %s state.", self,
|
||||
new_state, exc_info=True)
|
||||
logger.warnng("Failed to transition '%s' to %s state.", self,
|
||||
new_state, exc_info=True)
|
||||
return moved
|
||||
|
||||
@fasteners.locked
|
||||
|
||||
@@ -328,8 +328,8 @@ class JobBoardIterator:
|
||||
if maybe_job.state in allowed_states:
|
||||
job = maybe_job
|
||||
except excp.JobFailure:
|
||||
self._logger.warn("Failed determining the state of"
|
||||
" job '%s'", maybe_job, exc_info=True)
|
||||
self._logger.warning("Failed determining the state of"
|
||||
" job '%s'", maybe_job, exc_info=True)
|
||||
except excp.NotFound:
|
||||
# Attempt to clean this off the board now that we found
|
||||
# it wasn't really there (this **must** gracefully handle
|
||||
|
||||
Reference in New Issue
Block a user