mirror of
https://gitlab.crans.org/bde/nk20-scripts
synced 2025-06-29 09:50:54 +02:00
add timed decorator for perf tracking
This commit is contained in:
@ -15,7 +15,7 @@ from note.models import Note, NoteUser, NoteClub
|
||||
from note.models import Alias
|
||||
from member.models import Club, Profile
|
||||
|
||||
from ._import_utils import ImportCommand, BulkCreateManager
|
||||
from ._import_utils import ImportCommand, BulkCreateManager, timed
|
||||
|
||||
M_DURATION = 396
|
||||
M_START = datetime.date(2019, 8, 31)
|
||||
@ -44,6 +44,8 @@ class Command(ImportCommand):
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument('-a', '--alias', action='store_true', help="import alias")
|
||||
|
||||
|
||||
@timed
|
||||
@transaction.atomic
|
||||
def import_account(self, cur, chunk_size):
|
||||
"""
|
||||
@ -157,6 +159,7 @@ class Command(ImportCommand):
|
||||
bulk_mgr.done()
|
||||
self.print_success("comptes table imported")
|
||||
|
||||
@timed
|
||||
def import_alias(self, cur, chunk_size):
|
||||
"""
|
||||
Import Alias from nk15
|
||||
|
Reference in New Issue
Block a user