From ffbe613abed23c7c5960d4fcffc6aa0bf02165b1 Mon Sep 17 00:00:00 2001 From: Martin Styk Date: Fri, 19 Jan 2024 16:05:05 +0100 Subject: [PATCH] fix(async): rename module to avoid use of reserved keyword Signed-off-by: Martin Styk --- .../src/bkr/labcontroller/{async.py => concurrency.py} | 0 LabController/src/bkr/labcontroller/provision.py | 2 +- .../bkr/labcontroller/{test_async.py => test_concurrency.py} | 2 +- LabController/src/bkr/labcontroller/watchdog.py | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename LabController/src/bkr/labcontroller/{async.py => concurrency.py} (100%) rename LabController/src/bkr/labcontroller/{test_async.py => test_concurrency.py} (98%) diff --git a/LabController/src/bkr/labcontroller/async.py b/LabController/src/bkr/labcontroller/concurrency.py similarity index 100% rename from LabController/src/bkr/labcontroller/async.py rename to LabController/src/bkr/labcontroller/concurrency.py diff --git a/LabController/src/bkr/labcontroller/provision.py b/LabController/src/bkr/labcontroller/provision.py index bb8ff924a..43f118ac8 100644 --- a/LabController/src/bkr/labcontroller/provision.py +++ b/LabController/src/bkr/labcontroller/provision.py @@ -235,7 +235,7 @@ def handle_clear_netboot(command): netboot.clear_all(command['fqdn']) def handle_power(conf, command): - from bkr.labcontroller.async import MonitoredSubprocess + from bkr.labcontroller.concurrency import MonitoredSubprocess script = find_power_script(command['power']['type']) env = build_power_env(command) # We try the command up to 5 times, because some power commands diff --git a/LabController/src/bkr/labcontroller/test_async.py b/LabController/src/bkr/labcontroller/test_concurrency.py similarity index 98% rename from LabController/src/bkr/labcontroller/test_async.py rename to LabController/src/bkr/labcontroller/test_concurrency.py index 3f8ec340e..4abd6f37f 100644 --- a/LabController/src/bkr/labcontroller/test_async.py +++ b/LabController/src/bkr/labcontroller/test_concurrency.py @@ -18,7 +18,7 @@ # gevent.wait was gevent.run in 1.0 beta # pylint: disable=E0611 from gevent import run as gevent_wait -from bkr.labcontroller.async import MonitoredSubprocess +from bkr.labcontroller.concurrency import MonitoredSubprocess class SubprocessTest(unittest.TestCase): diff --git a/LabController/src/bkr/labcontroller/watchdog.py b/LabController/src/bkr/labcontroller/watchdog.py index f3685cc06..2eca607ef 100644 --- a/LabController/src/bkr/labcontroller/watchdog.py +++ b/LabController/src/bkr/labcontroller/watchdog.py @@ -87,7 +87,7 @@ def get_expired_watchdogs(self): def abort(self, recipe_id, system): # Don't import this at global scope. It triggers gevent to create its default hub, # but we need to ensure the gevent hub is not created until *after* we have daemonized. - from bkr.labcontroller.async import MonitoredSubprocess + from bkr.labcontroller.concurrency import MonitoredSubprocess logger.info('External Watchdog Expired for recipe %s on system %s', recipe_id, system) if self.conf.get("WATCHDOG_SCRIPT"): job = lxml.etree.fromstring(self.get_my_recipe(dict(recipe_id=recipe_id)))