cron test
This commit is contained in:
parent
0770dcdf48
commit
52986274e0
|
|
@ -22,8 +22,7 @@
|
||||||
#diagram {
|
#diagram {
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
/*min-width: 100%;
|
/*min-width: 100%;
|
||||||
min-height: 100%;*/
|
min-height: 100%;*/
|
||||||
scroll-behavior: smooth;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.example {
|
.example {
|
||||||
|
|
|
||||||
|
|
@ -685,6 +685,7 @@ def cronactions(request, code):
|
||||||
|
|
||||||
if(code == settings.CRONAPIKEY):
|
if(code == settings.CRONAPIKEY):
|
||||||
# NEWS CHECKING
|
# NEWS CHECKING
|
||||||
|
'''
|
||||||
all_unnotifc_news = News.objects.filter(agnotify=False, go_online_on__lt=timezone.now())
|
all_unnotifc_news = News.objects.filter(agnotify=False, go_online_on__lt=timezone.now())
|
||||||
|
|
||||||
for news in all_unnotifc_news:
|
for news in all_unnotifc_news:
|
||||||
|
|
@ -713,9 +714,24 @@ def cronactions(request, code):
|
||||||
if(user.profile.news_push):
|
if(user.profile.news_push):
|
||||||
newnotification = UserNotification(touser=user, notificationtext="Neue Agenturnews: " + news.name, notificationtype="agencynews", elementid=news.pk)
|
newnotification = UserNotification(touser=user, notificationtext="Neue Agenturnews: " + news.name, notificationtype="agencynews", elementid=news.pk)
|
||||||
newnotification.save()
|
newnotification.save()
|
||||||
|
'''
|
||||||
|
send_mail(
|
||||||
|
'Agentur-Benachrichtigung OK',
|
||||||
|
'Cron Test',
|
||||||
|
'support@digitale-agentur.com',
|
||||||
|
["htrampe@gmail.com"],
|
||||||
|
fail_silently=False
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print("API CODE FAILED")
|
#print("API CODE FAILED")
|
||||||
|
send_mail(
|
||||||
|
'Agentur-Benachrichtigung FAIL',
|
||||||
|
'Cron Test',
|
||||||
|
'support@digitale-agentur.com',
|
||||||
|
["htrampe@gmail.com"],
|
||||||
|
fail_silently=False
|
||||||
|
)
|
||||||
return JsonResponse({})
|
return JsonResponse({})
|
||||||
Loading…
Reference in New Issue