Add simulate_publish management command
Prior to this commit, any apps that update their data when courses are published had to create their own management commands for bootstrapping or error recovery (e.g. generate_course_overviews, generate_course_blocks). This is a management command to allow us to generically simulate a course_publish signal so that any async tasks that trigger actions off of that can do so without having to each write their own management commands. It has a few options to make it more ops friendly: * Can specify a set of courses, but defaults to all courses in the modulestore. * Can specify a set of listeners, so we can bootstrap a new app without rebuilding everything. * Can specify a delay between emitting signals so that we don't flood the queues and block author-initiated publishes from going through in a timely manner. * Dry-run mode for a simple preview of what the script will attempt.
Showing
- openedx/core/djangoapps/content/course_overviews/management/commands/simulate_publish.py 308 additions, 0 deletions.../course_overviews/management/commands/simulate_publish.py
- openedx/core/djangoapps/content/course_overviews/management/commands/tests/test_simulate_publish.py 147 additions, 0 deletions...rviews/management/commands/tests/test_simulate_publish.py
Please register or sign in to comment