Commit 6b9fe392 authored by sumpfralle's avatar sumpfralle

don't try to get statistics, if the server is not enabled


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@771 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 572a93cc
......@@ -1468,6 +1468,8 @@ class ProjectGui:
not is_available)
self.gui.get_object("ProcessPoolStatisticsBox").set_visible(
is_available)
if is_available:
# start the refresh function
interval = int(max(1, self.gui.get_object(
"ProcessPoolRefreshInterval").get_value()))
gobject.timeout_add_seconds(interval,
......
......@@ -65,6 +65,9 @@ def is_pool_available():
def get_pool_statistics():
global __manager
if __manager is None:
return []
else:
return __manager.statistics().get_worker_statistics()
def init_threading(number_of_processes=None, enable_server=False, remote=None, run_server=False,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment