diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ogRest.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ogRest.py b/src/ogRest.py index cec6aa8..60a33b0 100644 --- a/src/ogRest.py +++ b/src/ogRest.py @@ -86,11 +86,15 @@ class ogRest(): client.send(self.getResponse(ogResponses.OK)) def process_shellrun(self, client, cmd): + # Executing cmd thread + def execcmd(msgqueue): + msgqueue.put(ogOperations.execCMD(cmd)) + if cmd == None: client.send(self.getResponse(ogResponses.BAD_REQUEST)) return - self.msgqueue.put(ogOperations.execCMD(cmd)) + threading.Thread(target=execcmd, args=(self.msgqueue,)).start() client.send(self.getResponse(ogResponses.IN_PROGRESS)) def process_shellout(self, client): |