Commit 5bcccfa8 authored by Rudy BARAGLIA's avatar Rudy BARAGLIA
Browse files

Remove issue where temp files were not deleted from the server

parent 078eb64b
......@@ -79,7 +79,6 @@ class MainHandler(tornado.web.RequestHandler):
class DecodeRequestHandler(tornado.web.RequestHandler):
SUPPORTED_METHOD = ('POST')
#Called at the beginning of a request before get/post/etc
#Request A worker.
def prepare(self):
self.worker = None
self.filePath = None
......@@ -141,6 +140,7 @@ class DecodeRequestHandler(tornado.web.RequestHandler):
def receive_response(self, message):
logging.debug("Forwarding transcription to client")
self.write({'transcript': message})
os.remove(TEMP_FILE_PATH+self.uuid+'.wav')
self.set_status(200, "Transcription succeded")
self.application.num_requests_processed += 1
self.waitResponse.notify()
......
{"transcript": "{\"transcript\": \"je veux appeler mocanu adrian\"}"}
\ No newline at end of file
#/bin/bash
cd $PWD
./module/server/master_server.py
./modules/worker_offline/start_worker.sh
#!/bin/sh
i=0
while [ "$i" -lt 100 ]
do
curl -F "wavFile=@mocanu-Samy.wav" http://localhost:8888/client/post/speech &
echo $i
i=`expr $i + 1`
done
\ No newline at end of file
Markdown is supported
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