mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
fix
This commit is contained in:
@@ -471,13 +471,13 @@ def emit(*args, **kwargs):
|
||||
return socketio.emit(*args, **kwargs)
|
||||
|
||||
#replacement for tpool.execute to maintain request contexts
|
||||
def tpool.execute(function, *args, **kwargs):
|
||||
def replacement_tpool_execute(function, *args, **kwargs):
|
||||
temp = {}
|
||||
socketio.start_background_task(tpool.execute_2, function, temp, *args, **kwargs).join()
|
||||
print(temp)
|
||||
return temp[1]
|
||||
|
||||
def tpool.execute_2(function, temp, *args, **kwargs):
|
||||
def replacement_tpool_execute_2(function, temp, *args, **kwargs):
|
||||
temp[1] = function(*args, **kwargs)
|
||||
|
||||
# marshmallow/apispec setup
|
||||
|
Reference in New Issue
Block a user