quick cleanup
This commit is contained in:
parent
8bbe75b1ea
commit
47db17688d
1 changed files with 3 additions and 24 deletions
|
@ -148,44 +148,23 @@ class Message(object):
|
|||
|
||||
# return "test";
|
||||
async with self.filenameFetchLock:
|
||||
print(threading.enumerate())
|
||||
# print(threading.enumerate())
|
||||
|
||||
# client = AsyncHTTPClient()
|
||||
info = {
|
||||
'text': text,
|
||||
'variable': True if self.hasVariables() else False
|
||||
}
|
||||
# queryString = urllib.parse.urlencode(info)
|
||||
# request = HTTPRequest(
|
||||
# url = f"http://localhost:{self.story.panopticon_port}/voice?{queryString}",
|
||||
# # url = f"http://rubenvandeven.com/",
|
||||
# method="GET"
|
||||
# )
|
||||
# self.logger.log(LOG_BS, request.url)
|
||||
# response = await client.fetch(request)
|
||||
s = Context.instance().socket(zmq.REQ) #: :type s: zmq.sugar.Socket
|
||||
voiceAddr = f"ipc://voice{self.story.hugvey.id}"
|
||||
s.connect(voiceAddr)
|
||||
await s.send_json(info)
|
||||
print('sent now wait')
|
||||
filename = await s.recv_string()
|
||||
print('reply', filename)
|
||||
s.close()
|
||||
|
||||
|
||||
print(threading.enumerate())
|
||||
# for t in threading.enumerate(): #: :type t: threading.Thread
|
||||
# if t.name.startswith('ThreadPoolExecutor'):
|
||||
# faulthandler.dump_traceback()
|
||||
# exit()
|
||||
|
||||
# return "local/voices/static/64/64a016ce38faaac6cc59f6dc8e64cfa6bb81005b.wav"
|
||||
|
||||
# if response.code != 200:
|
||||
# self.logger.critical(f"Error when fetching filename: {response.code} for {queryString}")
|
||||
# return None
|
||||
# print(threading.enumerate())
|
||||
|
||||
self.logger.debug(f"Fetched audio for {text}")
|
||||
self.logger.debug(f"Fetched audio for {text}: {filename}")
|
||||
return filename
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue