diff --git a/hugvey/central_command.py b/hugvey/central_command.py index d9d0825..28e9eed 100644 --- a/hugvey/central_command.py +++ b/hugvey/central_command.py @@ -177,9 +177,10 @@ class CentralCommand(object): else: diff = datetime.timedelta(seconds=int(hv.story.timer.getElapsed() - hv.story.lastMsgFinishTime)) status['time_since_hugvey_spoke'] = str(diff) - if diff > 300: + diffs = diff.total_seconds() + if diffs > 300: status['time_since_hugvey_spoke_state'] = 'critical' - elif diff > 100: + elif diffs > 100: status['time_since_hugvey_spoke_state'] = 'warning' if not hv.story.timer.hasMark('last_speech'): @@ -187,10 +188,11 @@ class CentralCommand(object): else: diff = datetime.timedelta(seconds=int(hv.story.timer.getElapsed('last_speech'))) status['time_since_visitor_spoke'] = str(diff) - if diff > 300: + diffs = diff.total_seconds() + if diffs > 300: # evLogger.warning("Very long time since audience spoke") status['time_since_visitor_spoke'] = 'critical' - elif diff > 100: + elif diffs > 100: status['time_since_visitor_spoke'] = 'warning' # else: # #clear warning