Fix error on diff
This commit is contained in:
parent
70a146491f
commit
31d62a9710
1 changed files with 6 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue