def send_after_event_mail(): with app.app_context(): events = Event.query.all() for event in events: upcoming_events = DataGetter.get_upcoming_events(event.id) organizers = DataGetter.get_user_event_roles_by_role_name(event.id, 'organizer') speakers = DataGetter.get_user_event_roles_by_role_name(event.id, 'speaker') if datetime.now() > event.end_time: for speaker in speakers: send_after_event(speaker.user.email, event.id, upcoming_events) for organizer in organizers: send_after_event(organizer.user.email, event.id, upcoming_events)
def send_after_event_mail(): with app.app_context(): events = Event.query.all() for event in events: upcoming_events = DataGetter.get_upcoming_events(event.id) organizers = DataGetter.get_user_event_roles_by_role_name( event.id, 'organizer') speakers = DataGetter.get_user_event_roles_by_role_name( event.id, 'speaker') if datetime.now() > event.end_time: for speaker in speakers: send_after_event(speaker.user.email, event.id, upcoming_events) for organizer in organizers: send_after_event(organizer.user.email, event.id, upcoming_events)