Use new asyncio based events

This commit is contained in:
nemunaire 2017-09-01 20:39:40 +02:00
commit 30c81c1c4b
3 changed files with 71 additions and 12 deletions

View file

@ -37,10 +37,8 @@ def load(context):
chan = sayon["channel"]
context.send_response(srv, Response(txt, chan))
d = datetime(yrn, 1, 1, 0, 0, 0, 0,
timezone.utc) - datetime.now(timezone.utc)
context.add_event(ModuleEvent(interval=0, offset=d.total_seconds(),
call=bonneannee))
context.call_at(datetime(yrn, 1, 1, 0, 0, 0, 0, timezone.utc),
bonneannee)
# MODULE INTERFACE ####################################################