mirror of https://git.48k.eu/ogclient
Execute command received using Threads
Now we are blocking the execution when we apply a command sent from the server. This behavior is unacceptable for our client.more_events
parent
db7cc0d99e
commit
d065e1998d
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue