From 3aacba1f63b48b6d72883c2fd0a8b56d26573cc1 Mon Sep 17 00:00:00 2001 From: Ashley Penney Date: Thu, 17 Jan 2013 15:44:08 -0500 Subject: [PATCH] Run over each file and run the import. We could probably do this as a try/except and not delete if the output of the import failed but it may be simply easier to refetch those files from the S3 backup and try again. --- .../student/management/commands/pearson_transfer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/djangoapps/student/management/commands/pearson_transfer.py b/common/djangoapps/student/management/commands/pearson_transfer.py index 57401897dc..0037231a38 100644 --- a/common/djangoapps/student/management/commands/pearson_transfer.py +++ b/common/djangoapps/student/management/commands/pearson_transfer.py @@ -43,7 +43,9 @@ class Command(BaseCommand): settings.PEARSON['LOCAL_IMPORT'], options['mode']) s3(settings.PEARSON['LOCAL_IMPORT'], settings.PEARSON['BUCKET'], options['mode']) - call_command('pearson_import', 'dest_from_settings') + for file in os.listdir(settings.PEARSON['LOCAL_IMPORT']): + call_command('pearson_import_conf_zip', 'dest_from_settings') + os.remove(file) def export_pearson(): call_command('pearson_export_cdd', 'dest_from_settings')