Commit 8afe1ffe by Calen Pennington Committed by Nimisha Asthagiri

Move schedule management command log_prefix to a class attribute

parent c68883f0
......@@ -4,10 +4,7 @@ from openedx.core.djangoapps.schedules.tasks import ScheduleCourseUpdate
class Command(SendEmailBaseCommand):
async_send_task = ScheduleCourseUpdate
def __init__(self, *args, **kwargs):
super(Command, self).__init__(*args, **kwargs)
self.log_prefix = 'Upgrade Reminder'
log_prefix = 'Course Update'
def send_emails(self, *args, **kwargs):
for day_offset in xrange(-7, -77, -7):
......
......@@ -4,10 +4,7 @@ from openedx.core.djangoapps.schedules.tasks import ScheduleRecurringNudge
class Command(SendEmailBaseCommand):
async_send_task = ScheduleRecurringNudge
def __init__(self, *args, **kwargs):
super(Command, self).__init__(*args, **kwargs)
self.log_prefix = 'Scheduled Nudge'
log_prefix = 'Scheduled Nudge'
def send_emails(self, *args, **kwargs):
for day_offset in (-3, -10):
......
......@@ -4,10 +4,7 @@ from openedx.core.djangoapps.schedules.tasks import ScheduleUpgradeReminder
class Command(SendEmailBaseCommand):
async_send_task = ScheduleUpgradeReminder
def __init__(self, *args, **kwargs):
super(Command, self).__init__(*args, **kwargs)
self.log_prefix = 'Upgrade Reminder'
log_prefix = 'Upgrade Reminder'
def send_emails(self, *args, **kwargs):
self.enqueue(2, *args, **kwargs)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment