fix small annoyances,

* mute exception on early shutdown
* sfx: give the utime thread a name
This commit is contained in:
ed 2024-05-09 14:17:53 +00:00
parent 5c1e23907d
commit 2c92dab165
3 changed files with 9 additions and 3 deletions

View file

@ -461,7 +461,13 @@ class Up2k(object):
# important; not deferred by db_act
timeout = self._check_lifetimes()
timeout = min(timeout, now + self._check_xiu())
try:
timeout = min(timeout, now + self._check_xiu())
except Exception as ex:
if "closed cursor" in str(ex):
self.log("sched_rescan: lost db")
return
raise
with self.mutex:
for vp, vol in sorted(self.asrv.vfs.all_vols.items()):

View file

@ -398,7 +398,7 @@ def run(tmp, j2, ftp):
msg("sfxdir:", tmp)
msg()
t = threading.Thread(target=utime, args=(tmp,))
t = threading.Thread(target=utime, args=(tmp,), name="utime")
t.daemon = True
t.start()

View file

@ -80,7 +80,7 @@ def run():
msg(" rsrc dir:", rsrc)
msg()
t = threading.Thread(target=utime, args=(rsrc,))
t = threading.Thread(target=utime, args=(rsrc,), name="utime")
t.daemon = True
t.start()