From 286aa5f66ca3c70148c4afb03b7e7c40de0d44af Mon Sep 17 00:00:00 2001 From: krmanupa <60179455+krmanupa@users.noreply.github.com> Date: Tue, 14 Jun 2022 11:16:19 +0530 Subject: [PATCH] fixed thread is alive check to handle py3.9 updates (#859) * fixed thread is alive check to handle py3.9 updates * updated the minor version --- Makefile | 2 +- .../automationworker/3.x/worker/configuration3.py | 2 +- .../nxOMSAutomationWorker/automationworker/3.x/worker/job.py | 2 +- .../automationworker/3.x/worker/sandbox.py | 2 +- .../automationworker/worker/configuration.py | 2 +- .../automationworker/worker/configuration2.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 87e97fc97..bf0fda624 100755 --- a/Makefile +++ b/Makefile @@ -316,7 +316,7 @@ endif nxOMSAutomationWorker: rm -rf output/staging; \ - VERSION="1.7.10.0"; \ + VERSION="1.8.0.0"; \ PROVIDERS="nxOMSAutomationWorker"; \ STAGINGDIR="output/staging/$@/DSCResources"; \ cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ diff --git a/Providers/nxOMSAutomationWorker/automationworker/3.x/worker/configuration3.py b/Providers/nxOMSAutomationWorker/automationworker/3.x/worker/configuration3.py index f5a5daa9d..60c22e14e 100644 --- a/Providers/nxOMSAutomationWorker/automationworker/3.x/worker/configuration3.py +++ b/Providers/nxOMSAutomationWorker/automationworker/3.x/worker/configuration3.py @@ -58,7 +58,7 @@ DEFAULT_VM_ID = DEFAULT_UNKNOWN DEFAULT_WORKER_TYPE = DEFAULT_UNKNOWN DEFAULT_COMPONENT = DEFAULT_UNKNOWN -DEFAULT_WORKER_VERSION = "1.7.10.0" +DEFAULT_WORKER_VERSION = "1.8.0.0" DEFAULT_JRDS_POLLING_FREQUENCY = "15" # state configuration keys diff --git a/Providers/nxOMSAutomationWorker/automationworker/3.x/worker/job.py b/Providers/nxOMSAutomationWorker/automationworker/3.x/worker/job.py index d73688776..ec370cfdd 100644 --- a/Providers/nxOMSAutomationWorker/automationworker/3.x/worker/job.py +++ b/Providers/nxOMSAutomationWorker/automationworker/3.x/worker/job.py @@ -139,7 +139,7 @@ def execute_runbook(self): # wait for runbook execution to complete pending_action = None - while stream_handler.isAlive() or self.runtime.runbook_subprocess.poll() is None: + while stream_handler.is_alive() or self.runtime.runbook_subprocess.poll() is None: try: pending_action = self.msg_queue.get(block=False) tracer.log_sandbox_job_pending_action_detected(self.job_id, pending_action) diff --git a/Providers/nxOMSAutomationWorker/automationworker/3.x/worker/sandbox.py b/Providers/nxOMSAutomationWorker/automationworker/3.x/worker/sandbox.py index 957f5ecb2..f7fec0553 100644 --- a/Providers/nxOMSAutomationWorker/automationworker/3.x/worker/sandbox.py +++ b/Providers/nxOMSAutomationWorker/automationworker/3.x/worker/sandbox.py @@ -99,7 +99,7 @@ def stop_tracking_terminated_jobs(): # clean up finished jobs for job_id, job_tuple in list(job_map.items()): - if job_tuple[0].isAlive() is False: + if job_tuple[0].is_alive() is False: try: job_tuple[2].get(block=False) raise SandboxRuntimeException() diff --git a/Providers/nxOMSAutomationWorker/automationworker/worker/configuration.py b/Providers/nxOMSAutomationWorker/automationworker/worker/configuration.py index a1d8321ee..33a84c9de 100644 --- a/Providers/nxOMSAutomationWorker/automationworker/worker/configuration.py +++ b/Providers/nxOMSAutomationWorker/automationworker/worker/configuration.py @@ -56,7 +56,7 @@ DEFAULT_VM_ID = DEFAULT_UNKNOWN DEFAULT_WORKER_TYPE = DEFAULT_UNKNOWN DEFAULT_COMPONENT = DEFAULT_UNKNOWN -DEFAULT_WORKER_VERSION = "1.7.10.0" +DEFAULT_WORKER_VERSION = "1.8.0.0" DEFAULT_JRDS_POLLING_FREQUENCY = "15" # state configuration keys diff --git a/Providers/nxOMSAutomationWorker/automationworker/worker/configuration2.py b/Providers/nxOMSAutomationWorker/automationworker/worker/configuration2.py index 7715b5c43..87400fe0c 100644 --- a/Providers/nxOMSAutomationWorker/automationworker/worker/configuration2.py +++ b/Providers/nxOMSAutomationWorker/automationworker/worker/configuration2.py @@ -55,7 +55,7 @@ DEFAULT_VM_ID = DEFAULT_UNKNOWN DEFAULT_WORKER_TYPE = DEFAULT_UNKNOWN DEFAULT_COMPONENT = DEFAULT_UNKNOWN -DEFAULT_WORKER_VERSION = "1.7.10.0" +DEFAULT_WORKER_VERSION = "1.8.0.0" DEFAULT_JRDS_POLLING_FREQUENCY = "15" # state configuration keys