added notification when admin adds a new article

This commit is contained in:
abutalib-kiwi
2023-08-25 16:59:10 +05:30
parent b82902081f
commit 21b92f8c74
8 changed files with 32 additions and 13 deletions

View File

@ -27,6 +27,7 @@ app.config_from_object('django.conf:settings')
# Load task modules from all registered Django apps.
app.autodiscover_tasks()
# scheduled task
app.conf.beat_schedule = {
"expired_task": {
"task": "guardian.utils.update_expired_task_status",
@ -34,11 +35,11 @@ app.conf.beat_schedule = {
},
'notify_task_expiry': {
'task': 'base.tasks.notify_task_expiry',
'schedule': crontab(minute='0', hour='13'),
'schedule': crontab(minute='5', hour='12'),
},
'notify_top_junior': {
'task': 'base.tasks.notify_top_junior',
'schedule': crontab(minute='0', hour='*/1'),
'schedule': crontab(minute='*/5',),
},
}