Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Update code to support newer version of platform
Browse files Browse the repository at this point in the history
DENG-379
  • Loading branch information
pwnage101 committed Sep 11, 2020
1 parent 0ae0b7d commit 4edddee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion exporter/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,10 @@ def get_all_courses(**kwargs):
log.info('Retrieving all courses')

# make a set of fixed arguments, so we can memoize
kwargs = {k: v for k, v in kwargs.iteritems() if k.startswith('django')}
kwargs = {
k: v for k, v in kwargs.iteritems()
if k.startswith('django') or k == 'lms_config' or k == 'studio_config'
}
kwargs['dry_run'] = False # always query for course names
kwargs['limit'] = False # don't limit number of courses

Expand Down
4 changes: 2 additions & 2 deletions exporter/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class DjangoAdminTask(Task):
COMMAND = NotSet
ARGS = NotSet
EXT = NotSet
VARS = 'CONFIG_ROOT={django_config} SERVICE_VARIANT=lms'
VARS = 'LMS_CFG={lms_config}'
OUT = '/dev/null'
CMD = """
{variables}
Expand Down Expand Up @@ -955,7 +955,7 @@ class CourseContentTask(CourseTask, DjangoAdminTask):
COMMAND = 'export_olx'
ARGS = '{course}'
OUT = '{filename}'
VARS = 'CONFIG_ROOT={django_config} SERVICE_VARIANT=cms'
VARS = 'STUDIO_CFG={studio_config}'
# Change CMD to use django_cms_settings.
CMD = """
{variables}
Expand Down
3 changes: 2 additions & 1 deletion exporter/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def test_org_email_opt_in_task(mock_execute_shell):
'organization': 'the-org',
'other_names': ['the-second-org', 'the-third-org'],
'courses': ['course-1', u'coursé-2'],
'django_config': 'the-django-config',
'lms_config': 'the-lms-config',
'studio_config': 'the-studio-config',
'django_admin': 'the-django-admin',
'django_settings': 'the-django-setings',
'django_pythonpath': 'the-django-python-path',
Expand Down

0 comments on commit 4edddee

Please sign in to comment.