You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
492 B
19 lines
492 B
from django.core.management.base import BaseCommand
|
|
|
|
from apps.notification.tasks import send_course_access_expire_email
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = 'Send course access expire email'
|
|
|
|
def add_arguments(self, parser):
|
|
parser.add_argument(
|
|
'--days',
|
|
dest='days',
|
|
type=int,
|
|
help='Days before access expired',
|
|
)
|
|
|
|
def handle(self, *args, **options):
|
|
send_course_access_expire_email(options.get('days'))
|
|
|
|
|