From 13e9c4267c8875ff55afb973274369fd25059d71 Mon Sep 17 00:00:00 2001 From: tyboro2002 Date: Tue, 9 Apr 2024 14:08:16 +0200 Subject: [PATCH] speed up seeders --- backend/api/management/commands/seedDb.py | 38 +++++++++++------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/backend/api/management/commands/seedDb.py b/backend/api/management/commands/seedDb.py index 89dba3e5..58425bd3 100644 --- a/backend/api/management/commands/seedDb.py +++ b/backend/api/management/commands/seedDb.py @@ -491,25 +491,25 @@ def seed_data(self, amount, provider_function, update_function): def handle(self, *args, **options): start_time = time.time() # TODO maybey take as option - # amount_of_students = 50_000 - # amount_of_assistants = 300 - # amount_of_teachers = 500 - # amount_of_courses = 1_000 - # amount_of_projects = 3_000 - # amount_of_groups = 9_000 - # amount_of_submissions = 50_000 - # amount_of_file_extensions = 20 - # amount_of_structure_checks = 12_000 - - amount_of_students = 0 - amount_of_assistants = 0 - amount_of_teachers = 0 - amount_of_courses = 1 - amount_of_projects = 0 - amount_of_groups = 0 - amount_of_submissions = 0 - amount_of_file_extensions = 0 - amount_of_structure_checks = 0 + amount_of_students = 50_000 + amount_of_assistants = 300 + amount_of_teachers = 500 + amount_of_courses = 1_000 + amount_of_projects = 3_000 + amount_of_groups = 9_000 + amount_of_submissions = 50_000 + amount_of_file_extensions = 20 + amount_of_structure_checks = 12_000 + + # amount_of_students = 0 + # amount_of_assistants = 0 + # amount_of_teachers = 0 + # amount_of_courses = 1 + # amount_of_projects = 0 + # amount_of_groups = 0 + # amount_of_submissions = 0 + # amount_of_file_extensions = 0 + # amount_of_structure_checks = 0 self.seed_data(amount_of_students, fake.provide_student, update_Student_providers) self.stdout.write(self.style.SUCCESS('Successfully seeded students!'))