Fix blocking bug
This commit is contained in:
@@ -102,8 +102,11 @@ class PhotoshopInstance:
|
||||
self.comfyui_last_value_tracker = {}
|
||||
|
||||
# for apis calls
|
||||
def is_ps_history_changed(self):
|
||||
current_id = self.get_active_history_state_id_from_remote()
|
||||
async def is_ps_history_changed(self, sio):
|
||||
result = await sio.call('get_active_history_state_id', data={}, to=self.sid)
|
||||
if result is None:
|
||||
return False
|
||||
current_id = result.get('history_state_id', None)
|
||||
return self.get_img_state_id != current_id and self.get_img_state_id < current_id
|
||||
|
||||
# for nodes calls
|
||||
|
||||
+7
-8
@@ -97,14 +97,13 @@ class SDPPP:
|
||||
}, to=sid)
|
||||
|
||||
@sio.event
|
||||
def check_changes(sid):
|
||||
# instance = self.get_ps_instance()
|
||||
# if instance is None:
|
||||
# return
|
||||
# if not instance.is_ps_history_changed():
|
||||
# return
|
||||
# sio.emit('trigger_graph_change', to=sid)
|
||||
pass
|
||||
async def check_changes(sid):
|
||||
instance = self.get_ps_instance()
|
||||
if instance is None:
|
||||
return
|
||||
if not await instance.is_ps_history_changed(sio):
|
||||
return
|
||||
sio.emit('trigger_graph_change', to=sid)
|
||||
|
||||
@sio.event
|
||||
def reset_changes(sid):
|
||||
|
||||
Reference in New Issue
Block a user