|
11 | 11 | ecommerce: http://localhost:18130/ |
12 | 12 | credentials: http://localhost:18150/ |
13 | 13 | retirement_pipeline: |
14 | | - - ['RETIRING_CREDENTIALS', 'CREDENTIALS_COMPLETE', 'CREDENTIALS', 'retire_learner'] |
15 | | - - ['RETIRING_ECOM', 'ECOM_COMPLETE', 'ECOMMERCE', 'retire_learner'] |
16 | 14 | - ['RETIRING_LICENSE_MANAGER', 'LICENSE_MANAGER_COMPLETE', 'LICENSE_MANAGER', 'retire_learner'] |
17 | 15 | - ['RETIRING_FORUMS', 'FORUMS_COMPLETE', 'LMS', 'retirement_retire_forum'] |
18 | 16 | - ['RETIRING_EMAIL_LISTS', 'EMAIL_LISTS_COMPLETE', 'LMS', 'retirement_retire_mailings'] |
@@ -129,21 +127,6 @@ def _get_learner_and_state_index_or_exit(config, username): |
129 | 127 | FAIL_EXCEPTION(ERR_SETUP_FAILED, 'Unexpected error fetching user state!', str(exc)) |
130 | 128 |
|
131 | 129 |
|
132 | | -def _get_ecom_segment_id(config, learner): |
133 | | - """ |
134 | | - Calls Ecommerce to get the ecom-specific Segment tracking id that we need to retire. |
135 | | - This is only available from Ecommerce, unfortunately, and makes more sense to handle |
136 | | - here than to pass all of the config down to SegmentApi. |
137 | | - """ |
138 | | - try: |
139 | | - return config['ECOMMERCE'].get_tracking_key(learner) |
140 | | - except HttpDoesNotExistException: |
141 | | - LOG('Learner {} not found in Ecommerce. Setting Ecommerce Segment ID to None'.format(learner)) # noqa: UP032 |
142 | | - return None |
143 | | - except Exception as exc: # pylint: disable=broad-except |
144 | | - FAIL_EXCEPTION(ERR_SETUP_FAILED, 'Unexpected error fetching Ecommerce tracking id!', str(exc)) |
145 | | - |
146 | | - |
147 | 130 | @click.command("retire_learner") |
148 | 131 | @click.option( |
149 | 132 | '--username', |
@@ -172,9 +155,6 @@ def retire_learner( |
172 | 155 |
|
173 | 156 | learner, learner_state_index = _get_learner_and_state_index_or_exit(config, username) |
174 | 157 |
|
175 | | - if config.get('fetch_ecommerce_segment_id', False): |
176 | | - learner['ecommerce_segment_id'] = _get_ecom_segment_id(config, learner) |
177 | | - |
178 | 158 | start_state = None |
179 | 159 | try: |
180 | 160 | for start_state, end_state, service, method in config['retirement_pipeline']: |
|
0 commit comments