mirror of
https://gitlab.com/RemixDev/deemix-gui-pyweb.git
synced 2025-01-01 12:26:13 +00:00
Make sure requests runs async
This commit is contained in:
parent
011762a356
commit
df4bddaa53
|
@ -1,3 +1,4 @@
|
||||||
deemix>=1.3.0
|
deemix>=1.3.0
|
||||||
flask
|
flask
|
||||||
flask-socketio
|
flask-socketio
|
||||||
|
eventlet
|
||||||
|
|
|
@ -6,8 +6,10 @@ import subprocess
|
||||||
from os import path
|
from os import path
|
||||||
import json
|
import json
|
||||||
|
|
||||||
import requests
|
import eventlet
|
||||||
from urllib.request import urlopen
|
requests = eventlet.import_patched('requests')
|
||||||
|
urlopen = eventlet.import_patched('urllib.request').urlopen
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from flask import Flask, render_template, request, session, redirect, copy_current_request_context
|
from flask import Flask, render_template, request, session, redirect, copy_current_request_context
|
||||||
|
@ -71,7 +73,6 @@ class SocketInterface(MessageInterface):
|
||||||
socketio.emit(message, value)
|
socketio.emit(message, value)
|
||||||
else:
|
else:
|
||||||
socketio.emit(message)
|
socketio.emit(message)
|
||||||
socketio.sleep(0)
|
|
||||||
|
|
||||||
|
|
||||||
socket_interface = SocketInterface()
|
socket_interface = SocketInterface()
|
||||||
|
|
Loading…
Reference in a new issue