diff options
author | dennis <d@ennis.no> | 2023-02-01 19:38:35 +0100 |
---|---|---|
committer | dennis <d@ennis.no> | 2023-02-01 19:38:35 +0100 |
commit | 20c83cc935c1ddd808b82d985531cb694c1598f2 (patch) | |
tree | 694c49aa6c5d5e2dfbc8d47dac234d1d151a5f75 /common/queue.py | |
parent | use new dbi (diff) | |
download | energyscripts-20c83cc935c1ddd808b82d985531cb694c1598f2.tar.gz |
run queue in batches
Diffstat (limited to 'common/queue.py')
-rw-r--r-- | common/queue.py | 4 |
1 files changed, 3 insertions, 1 deletions
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 |