temp_images needs twice the size if show_only_filtered_image is false

This commit is contained in:
Marc-Andre Ferland 2022-10-14 23:21:44 -04:00
parent c7f6763c48
commit ff3db04ab7

View File

@ -53,7 +53,7 @@ class RenderTask(): # Task with output queue and completion lock.
def __init__(self, req: Request): def __init__(self, req: Request):
self.request: Request = req # Initial Request self.request: Request = req # Initial Request
self.response: Any = None # Copy of the last reponse self.response: Any = None # Copy of the last reponse
self.temp_images:[] = [None] * req.num_outputs self.temp_images:[] = [None] * req.num_outputs * (1 if req.show_only_filtered_image else 2)
self.error: Exception = None self.error: Exception = None
self.lock: threading.Lock = threading.Lock() # Locks at task start and unlocks when task is completed self.lock: threading.Lock = threading.Lock() # Locks at task start and unlocks when task is completed
self.buffer_queue: queue.Queue = queue.Queue() # Queue of JSON string segments self.buffer_queue: queue.Queue = queue.Queue() # Queue of JSON string segments