Example #1
0
 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'
Example #2
0
 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'
Example #3
0
 def executeScript(self, script):
     logger.debug('Executing script')
     th = ScriptExecutorThread(script)
     th.start()
Example #4
0
 def executeScript(self, script):
     logger.debug('Executing script')
     th = ScriptExecutorThread(script)
     th.start()