Silent an exception maybe raised during hot-reload
We just make it silent here. To present this exception to the user, although
it happens rarely, is useless and confusing anyway but even devs don't get
anything out of it.
@@ -1490,7 +1490,12 @@ def store_proc_while_running(bid, proc):
yield proc
finally:
with persist.active_procs_lock:
+ # During hot-reload `active_procs` gets evicted so we must
+ # expect a `ValueError` from time to time
+ try:
persist.active_procs[bid].remove(proc)
+ except ValueError:
+ pass
RUNNING_TEMPLATE = """{headline}
