Skip to content

Commit 8b339a4

Browse files
committed
do not close db between tags
1 parent 1e6624d commit 8b339a4

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

elixir/update.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -329,17 +329,14 @@ def update_version(db: DB, tag: bytes, pool: Pool, dts_comp_support: bool):
329329

330330
if __name__ == "__main__":
331331
dts_comp_support = bool(int(script('dts-comp')))
332-
db = None
332+
db = DB(getDataDir(), readonly=False, dtscomp=dts_comp_support, shared=False, update_cache=100000)
333333

334334
set_start_method('spawn')
335335
with Pool() as pool:
336336
for tag in scriptLines('list-tags'):
337-
if db is None:
338-
db = DB(getDataDir(), readonly=False, dtscomp=dts_comp_support, shared=False, update_cache=50000)
339-
340337
if not db.vers.exists(tag):
341338
logger.info("updating tag %s", tag)
342339
update_version(db, tag, pool, dts_comp_support)
343-
db.close()
344-
db = None
340+
341+
db.close()
345342

0 commit comments

Comments
 (0)