Add some debugs to the `insert` method.
parent
89bcc1717e
commit
d59c3d5310
|
@ -203,6 +203,7 @@ class TSDB:
|
||||||
return cls(filepath=filepath, do_create=do_create)
|
return cls(filepath=filepath, do_create=do_create)
|
||||||
|
|
||||||
def insert(self, objects, commit=True):
|
def insert(self, objects, commit=True):
|
||||||
|
common.log.debug('Trying to insert %d objects.', len(objects))
|
||||||
if not isinstance(objects, (list, tuple, types.GeneratorType)):
|
if not isinstance(objects, (list, tuple, types.GeneratorType)):
|
||||||
objects = [objects]
|
objects = [objects]
|
||||||
|
|
||||||
|
@ -222,8 +223,10 @@ class TSDB:
|
||||||
new_values[key] += status
|
new_values[key] += status
|
||||||
|
|
||||||
if commit:
|
if commit:
|
||||||
|
common.log.debug('Committing insert')
|
||||||
self.sql.commit()
|
self.sql.commit()
|
||||||
|
|
||||||
|
common.log.debug('Done inserting.')
|
||||||
return new_values
|
return new_values
|
||||||
|
|
||||||
def insert_submission(self, submission):
|
def insert_submission(self, submission):
|
||||||
|
|
Loading…
Reference in New Issue