Move check for server down to check_active_sessions

This commit is contained in:
Jonathan Wong 2015-11-17 06:57:02 -08:00
parent 1c4df69e61
commit c3ea35806e
3 changed files with 15 additions and 23 deletions

View file

@ -179,7 +179,7 @@ def notify_timeline(timeline_data=None, notify_action=None):
body=notify_strings[1])
# Set the notification state in the db
set_notify_state(session=timeline_data, state=notify_action, agent_info=agent)
elif notify_action == 'down':
elif not timeline_data and notify_action:
for agent in notifiers.available_notification_agents():
if agent['on_down'] and notify_action == 'down':
# Build and send notification