mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 22:07:36 -02:30
Fix up logger .warn() calls to use .warning() instead
This is a usage that was deprecated in Python 3.0.
This commit is contained in:
@@ -19,13 +19,13 @@ class Scheduler(Scheduler):
|
||||
|
||||
def run():
|
||||
ppid = os.getppid()
|
||||
logger.warn('periodic beat started')
|
||||
logger.warning('periodic beat started')
|
||||
while True:
|
||||
if os.getppid() != ppid:
|
||||
# if the parent PID changes, this process has been orphaned
|
||||
# via e.g., segfault or sigkill, we should exit too
|
||||
pid = os.getpid()
|
||||
logger.warn(f'periodic beat exiting gracefully pid:{pid}')
|
||||
logger.warning(f'periodic beat exiting gracefully pid:{pid}')
|
||||
raise SystemExit()
|
||||
try:
|
||||
for conn in connections.all():
|
||||
|
||||
Reference in New Issue
Block a user