From 20c83cc935c1ddd808b82d985531cb694c1598f2 Mon Sep 17 00:00:00 2001 From: dennis Date: Wed, 1 Feb 2023 19:38:35 +0100 Subject: run queue in batches --- common/queue.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'common/queue.py') diff --git a/common/queue.py b/common/queue.py index abdfb96..e567fb4 100644 --- a/common/queue.py +++ b/common/queue.py @@ -16,5 +16,7 @@ def dbi(sql,values,**kwargs): q.put(pickle.dumps([sql, values])) if verbose is True: - print("Inserted into queue") + table = sql.split(' ')[2] + num = 1 if isinstance(values, tuple) else len(values) + print("Inserted", num, "item(s) into queue for", table) return True -- cgit v1.2.3