def post_script(self, params): logger.debug('Received script: {}'.format(params)) if 'script' not in params: raise Exception('Invalid script parameters') if 'user' in params: logger.debug('Sending SCRIPT to clients') HTTPServerHandler.service.ipc.sendScriptMessage(params['script']) else: # Execute script at server space, that is, here # as a secondary thread th = ScriptExecutorThread(params['script']) th.start() return 'ok'
def executeScript(self, script): logger.debug('Executing script') th = ScriptExecutorThread(script) th.start()