Пример #1
0
    DailyBag.work(),
    GiftSend.work(),
    Group.work(),
    Heart.work(),
    Silver2Coin.work(),
    SilverBox.work(),
    Task.work(),
    MainDailyTask.work(),
    MatchTask.work()
]
server_tasks = [
    MonitorServer.run_forever()
]
danmu_tasks = [Danmu_Monitor.run_Danmu_Raffle_Handler(i) for i in area_ids]
other_tasks = [
    rafflehandler.run()
]

api_thread = threading.Thread(target=API.work)
api_thread.start()

if not options.disable_console:
    console_thread = threading.Thread(target=console.cmdloop)
    console_thread.start()

# 先登陆一次,防止速度太快导致抽奖模块出错
Auth.work()

if config["Function"]["RAFFLE_HANDLER"] != "False":
    if config["Server"]["PERFER_SERVER"] != "False":
        loop.run_until_complete(asyncio.wait(daily_tasks+server_tasks+other_tasks))
Пример #2
0
loop = asyncio.get_event_loop()

timer = Timer(loop)
console = Console.Console(loop)

area_ids = [
    1,
    2,
    3,
    4,
    5,
    6,
]
Statistics(len(area_ids))
danmu_tasks = [Danmu_Monitor.run_Danmu_Raffle_Handler(i) for i in area_ids]
other_tasks = [rafflehandler.run()]

console_thread = threading.Thread(target=console.cmdloop)
console_thread.start()

# 先登陆一次,防止速度太快导致抽奖模块出错
Auth.work()


def daily_job():
    while (1):
        Auth.work()
        Capsule.work()
        Coin2Silver.work()
        GiftSend.work()
        Group.work()