...
Search for all courses in modulestore()
Put the course ids in the migration status table with status as ‘Not-Migrated’, donot overwrite course ids if already present
For each 'Not-Migrated' or 'Failed' course id in the migration status table , create a celery task with PersistOnFailureTask mixin which will:
Update the migration status for that course from ‘Not-Migrated’ to ‘In-Progress’ Search for videos
For each video create an atomic transaction
...
If all the videos of a course have been processed, update course migration status in the migration status table from ‘In-Progress to Migrated’
Update the Feature Flag to switch the user to S3 transcripts
...
Retry after 2 sec with maximum retries of 3 After 3 retries, update the migration status for that course from ‘In-Progress’ to ‘Failed’ in the migration status table
Rollout
Mock Runs
There should be atleast two Mock runs of the script on a refreshed staging instance. Issue fix cycle will follow each Mock run.
...