1
0
mirror of https://gitlab.crans.org/bde/nk20-scripts synced 2025-06-29 17:51:08 +02:00

add timed decorator for perf tracking

This commit is contained in:
Pierre-antoine Comby
2020-05-25 01:12:31 +02:00
parent 996ac3c337
commit f367b0ab2a
3 changed files with 22 additions and 2 deletions

View File

@ -22,7 +22,7 @@ class Command(ImportCommand):
def add_arguments(self, parser):
pass
@timed
@transaction.atomic
def import_activities(self, cur, chunk_size):
cur.execute("SELECT * FROM activites ORDER by id")
@ -58,6 +58,7 @@ class Command(ImportCommand):
bulk_mgr.done()
return MAP_IDACTIVITY, MAP_NAMEACTIVITY
@timed
@transaction.atomic
def import_activity_entries(cur):
bulk_mgr = BulkCreateManager()