Exemple #1
0
import asyncio
from managers.global_manager import GlobalManager

gm = GlobalManager()
gm.start()


async def main():
    print("hi")
    await gm.discussion_manager.call_test()
    print("bye")


#asyncio.run(main())
if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())
"""
try:
    loop.run_until_complete(asyncio.wait([main()]))
except asyncio.CancelledError:
    print('Tasks has been canceled')
finally:
    loop.close()
"""
Exemple #2
0
 def setUp(self) -> None:
     gm = GlobalManager()
     gm.start()
     self.board_manager = gm.board_manager
     self.log = logging.getLogger("BoardManagerTest")
Exemple #3
0
async def startup(ctx):
    utils.logging.info("Starting new worker...")
    # dedicate a manager for the worker
    ctx["cursor"] = utils.get_time()
    ctx["manager"] = GlobalManager()
    ctx["manager"].start()  # no Redis
Exemple #4
0
 def setUp(self) -> None:
     gm = GlobalManager()
     gm.start()
     self.user_manager = gm.user_manager
     self.log = logging.getLogger("UserManagerTest")