Commit 0a8710f0 authored by Gero Müller's avatar Gero Müller
Browse files

another fix for 100% cpu in workspaces, add allow_local flag for workspaces

parent 457e470a
......@@ -54,6 +54,8 @@ manager = local
# define default workspace id to use.
#default_workspace_id = 1
# allow the use of local workspaces
#allow_local = True
[user]
workspaces.add = True
......
......@@ -383,7 +383,8 @@ class Connection(object):
"import sys;exec(sys.stdin.read(int(sys.stdin.readline())))"
command = [self.__python, "-u", "-c", bootstrap_script]
if self.__host == "local:":
allow_local = vispa.config('workspace', 'allow_local', True)
if self.__host == "local:" and allow_local:
self._connection = LocalConnection(command)
else:
self._connection = SSHConnection(command, self.__host,
......
......@@ -312,6 +312,7 @@ class RpycDaemon(Daemon):
log_exception()
logger.debug("daemon connect pipes")
# connect the rpyc server to fifo
conn = rpyc.connect_pipes(fin, fout, Service,
{'allow_public_attrs': True})
......@@ -341,6 +342,7 @@ class RpycDaemon(Daemon):
finally:
conn.close()
logging.getLogger().handlers = []
logger.debug("daemon done")
# close fifos
......@@ -352,6 +354,7 @@ class RpycDaemon(Daemon):
os.remove(fout_path)
def delpid(self):
logging.getLogger().handlers = []
logger.debug("daemon cleanup base: %s" % self.base)
shutil.rmtree(self.base)
......
Supports Markdown
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