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):
|
||||
while True:
|
||||
try:
|
||||
q.get(block=True, timeout=0.5)
|
||||
except queue.Empty:
|
||||
q.close()
|
||||
q.join_thread()
|
||||
return
|
||||
try:
|
||||
q.get(block=True, timeout=0.5)
|
||||
except queue.Empty:
|
||||
q.close()
|
||||
q.join_thread()
|
||||
return
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
|
||||
def generate_color_palette(n):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user