Пример #1
0
def main():
    parser = argparse.ArgumentParser(description="Harpseal Command Line Applcation")
    args = parser.parse_args()

    app = Harpseal()

    retcode = 0
    loop = asyncio.get_event_loop()
    try:
        loop.run_until_complete(app.start(loop))
    except KeyboardInterrupt:
        pass
    except Exception as exc:
        retcode = 1
        traceback.print_exc()

    return retcode
Пример #2
0
def main():
    parser = argparse.ArgumentParser(
        description='Harpseal Command Line Applcation')
    args = parser.parse_args()

    app = Harpseal()

    retcode = 0
    loop = asyncio.get_event_loop()
    try:
        loop.run_until_complete(app.start(loop))
    except KeyboardInterrupt:
        pass
    except Exception as exc:
        retcode = 1
        traceback.print_exc()

    return retcode
Пример #3
0
 def initapp(self, loop):
     app = Harpseal(conf="config.sample.json")
     app_task = asyncio.Task(app.start(loop))
     for task in app.tasks:
         task._interval = 2
     return app
Пример #4
0
 def initapp(self, loop):
     app = Harpseal(conf='config.sample.json')
     app_task = asyncio.Task(app.start(loop))
     for task in app.tasks:
         task._interval = 2
     return app