target messages older than today not older than tomorrow
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
This commit is contained in:
@@ -67,10 +67,10 @@ class telegramUtils():
|
||||
return send_result
|
||||
|
||||
def clear_expired_messages(self):
|
||||
yesterday=datetime.now()+timedelta(days=-1)
|
||||
today = datetime.now()
|
||||
#filter all the messages that expired yesterday or before
|
||||
expired_messages_list = []
|
||||
expired_messages = TelegramData.objects.filter(expiration_date__lte=yesterday)
|
||||
expired_messages = TelegramData.objects.filter(expiration_date__lte=today)
|
||||
|
||||
#leave if the list is empty
|
||||
if len(expired_messages) == 0:
|
||||
|
||||
Reference in New Issue
Block a user