Move schedule management command log_prefix to a class attribute
This commit is contained in:
committed by
Nimisha Asthagiri
parent
c68883f009
commit
8afe1ffe17
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user