Exemplo n.º 1
0
async def sell_prepared_lots(api: Tele2Api, lots: list):
    tasks = []
    for lot in lots:
        task = asyncio.ensure_future(api.sell_lot(lot))
        tasks.append(task)
    print('Listing...')
    lots = await asyncio.gather(*tasks)
    print_lot_listing_status(lots)
Exemplo n.º 2
0
async def sell_prepared_lots(api: Tele2Api, lots: list):
    tasks = []
    for lot in lots:
        task = asyncio.ensure_future(api.sell_lot(lot))
        tasks.append(task)
    print('Listing...')
    lots = await asyncio.gather(*tasks)
    if any(lot['meta']['status'] == "bp_err_limDay" for lot in lots):
        print(Fore.MAGENTA +
              'Day listing limit (100) reached. Try again tomorrow.')
    else:
        print(Fore.BLUE + 'Lots have been listed to sell.')