-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add basic notify cmd ^ celery config
feat: checkpoint with celery beat comptibility feat: move task checkpoint Revert "feat: move task checkpoint" This reverts commit 8a80117. feat: configure settings and task file feat: add configuration to emails command this also set the celery import to could find the task and celery worker register it. the signals tasks are registered by default due the receiver import it when the plugin is connected chore: rename of cmd and celery notification task feat: add command emails course due date
- Loading branch information
Showing
4 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
eox_nelp/management/commands/check_course_due_date_emails_delivery.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
""""Management command to check and if conditions are | ||
stadified, manage the delivery upcoming course due date emails to a celery task.""" | ||
|
||
import logging | ||
|
||
from django.core.management import BaseCommand | ||
|
||
from eox_nelp.notifications.tasks import send_course_due_date_emails | ||
|
||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class Command(BaseCommand): | ||
def handle(self, *args, **options): # lint-amnesty, pylint: disable=too-many-statements | ||
logger.info('----Checking course due emails by command.-----') |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# tasks.py | ||
|
||
import logging | ||
|
||
from celery import shared_task | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
@shared_task | ||
def send_course_due_date_emails(): | ||
""" | ||
Task to send upcoming course due date emails. | ||
""" | ||
logger.info("------Sending upcoming course due date emails.-------") | ||
logger.info("This is a log message. yeah yeah") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters