pybackive/backive/backive_service

29 lines
590 B
Python

#!/usr/bin/env python3
"""
Service startup script.
"""
import asyncio
from backive.core.events import EventInterface
from backive.config.config import Config
class Backive:
def __init__(self):
self._config = Config()
self._events = None
async def callback(self, data=None):
print("Callback: {}".format(str(data)))
def serve(self):
loop = asyncio.get_event_loop()
self._events = EventInterface(self.callback, None, loop)
loop.run_forever()
pass
if __name__ == "__main__":
backive = Backive()
backive.serve()