mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-01 19:17:41 +03:00
Cleanup
This commit is contained in:
parent
85dcfdd670
commit
036d1949e7
@ -341,11 +341,14 @@ def clear_and_unlink(file: Path, missing_ok: bool = True) -> None:
|
|||||||
def empty_and_close_queue(q: mp.Queue):
|
def empty_and_close_queue(q: mp.Queue):
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
q.get(block=True, timeout=0.5)
|
try:
|
||||||
except queue.Empty:
|
q.get(block=True, timeout=0.5)
|
||||||
q.close()
|
except queue.Empty:
|
||||||
q.join_thread()
|
q.close()
|
||||||
return
|
q.join_thread()
|
||||||
|
return
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def generate_color_palette(n):
|
def generate_color_palette(n):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user