mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-20 15:27:04 +08:00
Add timestamp to execution messages
This commit is contained in:
parent
95fa9545f1
commit
b071fff999
@ -3,6 +3,7 @@ import copy
|
||||
import logging
|
||||
import threading
|
||||
import heapq
|
||||
import time
|
||||
import traceback
|
||||
import inspect
|
||||
from typing import List, Literal, NamedTuple, Optional
|
||||
@ -283,7 +284,11 @@ class PromptExecutor:
|
||||
self.success = True
|
||||
self.old_prompt = {}
|
||||
|
||||
def add_message(self, event, data, broadcast: bool):
|
||||
def add_message(self, event, data: dict, broadcast: bool):
|
||||
data = {
|
||||
**data,
|
||||
"timestamp": int(time.time() * 1000),
|
||||
}
|
||||
self.status_messages.append((event, data))
|
||||
if self.server.client_id is not None or broadcast:
|
||||
self.server.send_sync(event, data, self.server.client_id)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user