Update Help msgs of management commands

PROD-399
This commit is contained in:
uzairr
2019-08-02 15:20:26 +05:00
parent b876dce719
commit 80316c632d
21 changed files with 91 additions and 15 deletions

View File

@@ -5,6 +5,7 @@ A managment command that can be used to set up Schedules with various configurat
from __future__ import absolute_import
import datetime
from textwrap import dedent
import factory
import pytz
@@ -31,6 +32,7 @@ class Command(BaseCommand):
A management command that generates schedule objects for all expected course duration limit
email types, so that it is easy to generate test emails of all available types.
"""
help = dedent(__doc__).strip()
def handle(self, *args, **options):
courses = modulestore().get_courses()
@@ -52,5 +54,4 @@ class Command(BaseCommand):
CourseModeFactory.create(course_id=course_overview.id, mode_slug=CourseMode.AUDIT)
CourseModeFactory.create(course_id=course_overview.id, mode_slug=CourseMode.VERIFIED)
CourseDurationLimitExpirySchedule.create_batch(20, enrollment__course=course_overview)
ScheduleConfigFactory.create(site=Site.objects.get(name='example.com'))

View File

@@ -3,9 +3,10 @@
Send out reminder emails for any students who will lose access to course content in 7 days.
"""
from __future__ import absolute_import
from textwrap import dedent
from openedx.core.djangoapps.schedules.management.commands import SendEmailBaseCommand
from openedx.features.course_duration_limits.tasks import CourseDurationLimitExpiryReminder
@@ -13,6 +14,13 @@ from ... import resolvers
class Command(SendEmailBaseCommand):
"""
Send out reminder emails for any students who will lose access
to course content in 7 days.
./manage.py lms send_access_expiry_reminder <domain>
"""
help = dedent(__doc__).strip()
async_send_task = CourseDurationLimitExpiryReminder
log_prefix = resolvers.EXPIRY_REMINDER_LOG_PREFIX
offsets = (7,) # Days until Course Duration Limit expiry