mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
abandon listing tags in browser when db busy
This commit is contained in:
parent
357347ce3a
commit
2fcd0e7e72
|
@ -1765,7 +1765,9 @@ class HttpCli(object):
|
|||
fn = f["name"]
|
||||
rd = f["rd"]
|
||||
del f["rd"]
|
||||
if icur:
|
||||
if not icur:
|
||||
break
|
||||
|
||||
if vn != dbv:
|
||||
_, rd = vn.get_dbv(rd)
|
||||
|
||||
|
@ -1774,12 +1776,16 @@ class HttpCli(object):
|
|||
try:
|
||||
r = icur.execute(q, (rd, fn)).fetchone()
|
||||
except Exception as ex:
|
||||
if "database is locked" not in str(ex):
|
||||
if "database is locked" in str(ex):
|
||||
break
|
||||
|
||||
try:
|
||||
args = s3enc(idx.mem_cur, rd, fn)
|
||||
r = icur.execute(q, args).fetchone()
|
||||
except:
|
||||
self.log("tag list error:\n" + min_ex())
|
||||
m = "tag list error, {}/{}\n{}"
|
||||
self.log(m.format(rd, fn, min_ex()))
|
||||
break
|
||||
|
||||
tags = {}
|
||||
f["tags"] = tags
|
||||
|
@ -1794,7 +1800,9 @@ class HttpCli(object):
|
|||
taglist[k] = True
|
||||
tags[k] = v
|
||||
except:
|
||||
self.log("tag read error:\n" + min_ex())
|
||||
m = "tag read error, {}/{} [{}]:\n{}"
|
||||
self.log(m.format(rd, fn, w, min_ex()))
|
||||
break
|
||||
|
||||
if icur:
|
||||
taglist = [k for k in vn.flags.get("mte", "").split(",") if k in taglist]
|
||||
|
|
Loading…
Reference in a new issue