From ccd58786b90e358b19fa1d5108802856d6b4b237 Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Wed, 18 Sep 2024 11:07:02 +0530 Subject: [PATCH] mgr/vol: use pre-defined timeout period instead of hardcoded value Currently timeout is set to 5. But hardcoding this is unnecessary since the class already defines a attribute for this purpose. Use that instead. Signed-off-by: Rishabh Dave --- src/pybind/mgr/volumes/fs/async_job.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/volumes/fs/async_job.py b/src/pybind/mgr/volumes/fs/async_job.py index 6834e3e240b..83a119ca556 100644 --- a/src/pybind/mgr/volumes/fs/async_job.py +++ b/src/pybind/mgr/volumes/fs/async_job.py @@ -167,7 +167,7 @@ class AsyncJobs(threading.Thread): for i in range(c, self.nr_concurrent_jobs): self.threads.append(JobThread(self, self.vc, name="{0}.{1}.{2}".format(self.name_pfx, time.time(), i))) self.threads[-1].start() - self.cv.wait(timeout=5) + self.cv.wait(timeout=self.wakeup_timeout) def shutdown(self): self.stopping.set() -- 2.47.3