websocket

This commit is contained in:
Lilian937342 2022-07-28 11:07:03 +02:00
parent 2e45cd6006
commit ebfb3ac492
10 changed files with 6 additions and 13 deletions

View File

@ -232,7 +232,7 @@ REST_FRAMEWORK = {
LOGGING = {
"""LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
@ -251,7 +251,7 @@ LOGGING = {
'propagate': False,
},
},
}
}"""

Binary file not shown.

View File

@ -432,7 +432,7 @@ def pdfGen(request):
check=True,
cwd=direct)
except TexError:
raise TexError(log=log, source=latex,
raise TexError(log="./logs.txt", source=latex,
template_name='test.tex')
try:
subprocess.run(command, shell=True,
@ -441,7 +441,7 @@ def pdfGen(request):
check=True,
cwd=direct)
except TexError:
raise TexError(log=log, source=latex,
raise TexError(log='./logs.txt', source=latex,
template_name='test.tex')
with open(os.path.join(direct, 'tmp.pdf'), 'rb') as out:

View File

@ -22,9 +22,8 @@ class RoomConsumer(AsyncWebsocketConsumer):
await self.accept()
await self.send(json.dumps({'type': 'connect', "clientId": self.clientId}))
except:
print('test')
await self.close()
async def receive(self, text_data):

View File

@ -1,9 +1,3 @@
<<<<<<< HEAD
NEXT_PUBLIC_HOSTNAME=141.136.42.178
PORT=80
NEXT_PUBLIC_HOST=http://$NEXT_PUBLIC_HOSTNAME:$PORT
=======
NEXT_PUBLIC_HOSTNAME=192.168.1.18
NEXT_PUBLIC_PORT=80
NEXT_PUBLIC_HOST=http://$NEXT_PUBLIC_HOSTNAME:$NEXT_PUBLIC_PORT
>>>>>>> 14ab2403983411dea6475cad781ddef9a1c89b7c

View File

@ -18,7 +18,7 @@ export const WebsocketProvider = ({ children }) => {
var url = url.startsWith('/')? url: '/' + url
ws.current = new ReconnectingWebSocket(
`ws://${process.env.NEXT_PUBLIC_HOST}:${process.env.NEXT_PUBLIC_PORT}${url}`
`ws://${process.env.NEXT_PUBLIC_HOSTNAME}:${process.env.NEXT_PUBLIC_PORT}${url}`
);
ws.current.onopen = () => {