add mirgation after checking emails

This commit is contained in:
2022-08-22 23:19:07 +02:00
parent 8dc0812fbb
commit 91b46472c2
2 changed files with 10 additions and 6 deletions
+4
View File
@@ -9,6 +9,7 @@ from email.message import Message
from builtins import list
from src import params
from src.db.mirgration.migration_tools import migre_accepted_appointment
from src.db.mongo_manager import MONGO_STORE_MANAGER
from src.notification.AcceptedResultPojo import get_accepted_result_from, AcceptedResultPojo
from src.notification.mailer import Mailer
@@ -137,6 +138,9 @@ def accept_appointment_found(accepted_result_list: list):
mailer.send_email(get_accepted_result_from(reserve), to_all=True)
MONGO_STORE_MANAGER.update_reserve_result(reserve.id, ResultEnum.ACCEPTED)
if len(accepted_result_list) > 0:
migre_accepted_appointment(str(datetime.date.today()))
def read_mails_and_find_confirmation_contacts():
mail_list = MONGO_STORE_MANAGER.get_destination_emails()