import asyncio
from paddle_run.worker import CenterClientWorker
from argparse import ArgumentParser


async def main(addr, port, command):
    worker = CenterClientWorker(f'{addr}:{port}', '123456789', command)
    await worker.run()

if __name__ == "__main__":

    parser = ArgumentParser()
    parser.add_argument('--addr', type=str, default='127.0.0.1')
    parser.add_argument('--port', type=int, default=8000)
    parser.add_argument('--command', type=str, default='python')
    args = parser.parse_args()


    asyncio.run(main(args.addr, args.port, args.command))