|
21 | 21 | batch_unassign_role_from_users, |
22 | 22 | ) |
23 | 23 | from openedx_authz.constants.roles import LEGACY_COURSE_ROLE_EQUIVALENCES, LIBRARY_ADMIN, LIBRARY_AUTHOR, LIBRARY_USER |
24 | | -from openedx_authz.models.migrations import CourseAuthoringMigrationRun, MigrationType, ScopeType |
| 24 | +from openedx_authz.models.migrations import AuthzCourseAuthoringMigrationRun, MigrationType, ScopeType |
25 | 25 |
|
26 | 26 | logger = logging.getLogger(__name__) |
27 | 27 |
|
@@ -239,7 +239,7 @@ def _run_scoped_migration( |
239 | 239 | ) -> tuple[list, list]: |
240 | 240 | """Orchestrate a migration over a set of scopes with per-scope locking and tracking. |
241 | 241 |
|
242 | | - For each scope, creates a ``CourseAuthoringMigrationRun``, acquires a distributed lock, |
| 242 | + For each scope, creates a ``AuthzCourseAuthoringMigrationRun``, acquires a distributed lock, |
243 | 243 | and delegates the work to ``process_scope_fn``. Scopes whose lock cannot be acquired are |
244 | 244 | marked SKIPPED. |
245 | 245 |
|
@@ -271,7 +271,7 @@ def _run_scoped_migration( |
271 | 271 | "org_id": org_id if scope_type == ScopeType.ORG else None, |
272 | 272 | "delete_after": delete_after_migration, |
273 | 273 | } |
274 | | - migration_run = CourseAuthoringMigrationRun.create_pending(migration_type, scope_type, scope_key, metadata) |
| 274 | + migration_run = AuthzCourseAuthoringMigrationRun.create_pending(migration_type, scope_type, scope_key, metadata) |
275 | 275 |
|
276 | 276 | if not _acquire_lock(scope_type, scope_key, migration_run.id): |
277 | 277 | logger.warning(f"Migration already in progress for {scope_type}:{scope_key}.") |
|
0 commit comments