FIX timestamp handling
This commit is contained in:
parent
b5a100f9e7
commit
ae9cb38bbe
2 changed files with 4 additions and 1 deletions
|
@ -112,6 +112,9 @@ class Monitor(ParentedLet):
|
||||||
except:
|
except:
|
||||||
logging.exception("Could not generate "
|
logging.exception("Could not generate "
|
||||||
"an alarm from timespec {}".format(timespec))
|
"an alarm from timespec {}".format(timespec))
|
||||||
|
if when is None:
|
||||||
|
# expired
|
||||||
|
return
|
||||||
delta = when - now
|
delta = when - now
|
||||||
assert delta.total_seconds() > 0
|
assert delta.total_seconds() > 0
|
||||||
self.log.info('Will run after %d seconds' % delta.total_seconds())
|
self.log.info('Will run after %d seconds' % delta.total_seconds())
|
||||||
|
|
|
@ -17,5 +17,5 @@ def singlealarm_receive(form):
|
||||||
return {
|
return {
|
||||||
'kind': 'single',
|
'kind': 'single',
|
||||||
'nick': form.nick.data,
|
'nick': form.nick.data,
|
||||||
'timestamp': form.dt.data.strftime('%s')
|
'timestamp': int(form.dt.data.strftime('%s'))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue