]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/vol: use pre-defined timeout period instead of hardcoded value 59848/head
authorRishabh Dave <ridave@redhat.com>
Wed, 18 Sep 2024 05:37:02 +0000 (11:07 +0530)
committerRishabh Dave <ridave@redhat.com>
Wed, 18 Sep 2024 05:37:02 +0000 (11:07 +0530)
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 <ridave@redhat.com>
src/pybind/mgr/volumes/fs/async_job.py

index 6834e3e240b335a5d8c73b69fd28d292e51d8ebb..83a119ca5564ccd20d1e3ca01e1ebee8041b8d3a 100644 (file)
@@ -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()