cron test final
This commit is contained in:
parent
52986274e0
commit
559cc93d15
|
|
@ -682,10 +682,8 @@ def impressum(request):
|
|||
|
||||
'''
|
||||
def cronactions(request, code):
|
||||
|
||||
if(code == settings.CRONAPIKEY):
|
||||
# NEWS CHECKING
|
||||
'''
|
||||
# NEWS CHECKING
|
||||
all_unnotifc_news = News.objects.filter(agnotify=False, go_online_on__lt=timezone.now())
|
||||
|
||||
for news in all_unnotifc_news:
|
||||
|
|
@ -714,24 +712,7 @@ def cronactions(request, code):
|
|||
if(user.profile.news_push):
|
||||
newnotification = UserNotification(touser=user, notificationtext="Neue Agenturnews: " + news.name, notificationtype="agencynews", elementid=news.pk)
|
||||
newnotification.save()
|
||||
'''
|
||||
send_mail(
|
||||
'Agentur-Benachrichtigung OK',
|
||||
'Cron Test',
|
||||
'support@digitale-agentur.com',
|
||||
["htrampe@gmail.com"],
|
||||
fail_silently=False
|
||||
)
|
||||
|
||||
|
||||
|
||||
else:
|
||||
#print("API CODE FAILED")
|
||||
send_mail(
|
||||
'Agentur-Benachrichtigung FAIL',
|
||||
'Cron Test',
|
||||
'support@digitale-agentur.com',
|
||||
["htrampe@gmail.com"],
|
||||
fail_silently=False
|
||||
)
|
||||
print("API CODE FAILED")
|
||||
return JsonResponse({})
|
||||
Loading…
Reference in New Issue