def main(args): bs = get_binstar(args, cls=BinstarBuildAPI) worker_config = WorkerConfiguration.load(args.worker_id, bs, warn=True) WorkerConfiguration.validate_worker_name(bs, args.worker_id) if worker_config.hostname != WorkerConfiguration.HOSTNAME: log.warn( WRONG_HOSTNAME_MSG.format(worker_config.hostname, WorkerConfiguration.HOSTNAME)) args.conda_build_dir = args.conda_build_dir.format( platform=worker_config.platform) setup_logging(logging.getLogger('binstar_build_client'), args.log_level, args.color, show_tb=args.show_traceback) log.info("Using conda build directory: {}".format(args.conda_build_dir)) log.info(str(worker_config)) worker = Worker(bs, worker_config, args) worker.write_status(True, "Starting") worker.write_stats() try: with worker_config.running(): worker.work_forever() finally: worker.write_status(False, "Exited")
def main(args): bs = get_binstar(args, cls=BinstarBuildAPI) worker_config = WorkerConfiguration.load(args.worker_id, bs, warn=True) WorkerConfiguration.validate_worker_name(bs, args.worker_id) if worker_config.hostname != WorkerConfiguration.HOSTNAME: log.warn(WRONG_HOSTNAME_MSG.format(worker_config.hostname, WorkerConfiguration.HOSTNAME)) args.conda_build_dir = args.conda_build_dir.format(platform=worker_config.platform) setup_logging(logging.getLogger('binstar_build_client'), args.log_level, args.color, show_tb=args.show_traceback) log.info("Using conda build directory: {}".format(args.conda_build_dir)) log.info(str(worker_config)) worker = Worker(bs, worker_config, args) worker.write_status(True, "Starting") worker.write_stats() try: with worker_config.running(): worker.work_forever() finally: worker.write_status(False, "Exited")
def main(args): if docker is None: raise errors.UserError( "anaconda worker docker_run requires docker and docker-py to be installed\n" "Run:\n\tpip install docker-py") bs = get_binstar(args, cls=BinstarBuildAPI) worker_config = WorkerConfiguration.load(args.worker_id, bs) worker = DockerWorker(bs, worker_config, args) worker.work_forever()
def main(args): if docker is None: raise errors.UserError("anaconda worker docker_run requires docker and docker-py to be installed\n" "Run:\n\tpip install docker-py") bs = get_binstar(args, cls=BinstarBuildAPI) worker_config = WorkerConfiguration.load(args.worker_id, bs) worker = DockerWorker(bs, worker_config, args) worker.work_forever()
def main(args, context="worker"): bs = get_binstar(args, cls=BinstarBuildAPI) if args.all: WorkerConfiguration.deregister_all(bs) elif args.worker_id: wconfig = WorkerConfiguration.load(args.worker_id, bs) wconfig.deregister(bs) else: log.info(context_info)
def main(args, context="worker"): bs = get_binstar(args, cls=BinstarBuildAPI) if args.all: WorkerConfiguration.deregister_all(bs) elif args.worker_id: wconfig = WorkerConfiguration.load(args.worker_id, bs) wconfig.deregister(bs) else: log.info(context_info)
def main(args): if docker is None: raise errors.UserError("anaconda worker docker_run requires docker and docker-py to be installed\n" "Run:\n\tpip install docker-py") bs = get_binstar(args, cls=BinstarBuildAPI) worker_config = WorkerConfiguration.load(args.worker_id, bs, warn=True) WorkerConfiguration.validate_worker_name(bs, args.worker_id) if worker_config.hostname != WorkerConfiguration.HOSTNAME: log.warn(WRONG_HOSTNAME_MSG.format(worker_config.hostname, WorkerConfiguration.HOSTNAME)) worker = DockerWorker(bs, worker_config, args) worker.work_forever()
def main(args): if docker is None: raise errors.UserError( "anaconda worker docker_run requires docker and docker-py to be installed\n" "Run:\n\tpip install docker-py") bs = get_binstar(args, cls=BinstarBuildAPI) worker_config = WorkerConfiguration.load(args.worker_id, bs, warn=True) WorkerConfiguration.validate_worker_name(bs, args.worker_id) if worker_config.hostname != WorkerConfiguration.HOSTNAME: log.warn( WRONG_HOSTNAME_MSG.format(worker_config.hostname, WorkerConfiguration.HOSTNAME)) worker = DockerWorker(bs, worker_config, args) worker.work_forever()
def main(args): bs = get_binstar(args, cls=BinstarBuildAPI) worker_config = WorkerConfiguration.load(args.worker_id, bs) args.conda_build_dir = args.conda_build_dir.format(platform=worker_config.platform) log.info("Using conda build directory: {}".format(args.conda_build_dir)) log.info(str(worker_config)) worker = Worker(bs, worker_config, args) worker.write_status(True, "Starting") try: with worker_config.running(): worker.work_forever() finally: worker.write_status(False, "Exited")
def main(args): bs = get_binstar(args, cls=BinstarBuildAPI) worker_config = WorkerConfiguration.load(args.worker_id, bs) args.conda_build_dir = args.conda_build_dir.format( platform=worker_config.platform) log.info("Using conda build directory: {}".format(args.conda_build_dir)) log.info(str(worker_config)) worker = Worker(bs, worker_config, args) worker.write_status(True, "Starting") try: with worker_config.running(): worker.work_forever() finally: worker.write_status(False, "Exited")
def main(args): if docker is None: raise errors.UserError("anaconda worker docker_run requires docker and docker-py to be installed\n" "Run:\n\tpip install docker-py") bs = get_binstar(args, cls=BinstarBuildAPI) worker_config = WorkerConfiguration.load(args.worker_id, bs, warn=True) WorkerConfiguration.validate_worker_name(bs, args.worker_id) if worker_config.hostname != WorkerConfiguration.HOSTNAME: log.warn(WRONG_HOSTNAME_MSG.format(worker_config.hostname, WorkerConfiguration.HOSTNAME)) setup_logging(logging.getLogger('binstar_build_client'), args.log_level, args.color, show_tb=args.show_traceback) worker = DockerWorker(bs, worker_config, args) worker.write_stats() worker.work_forever()
def main(args): if docker is None: raise errors.UserError( "anaconda worker docker_run requires docker and docker-py to be installed\n" "Run:\n\tpip install docker-py") bs = get_binstar(args, cls=BinstarBuildAPI) worker_config = WorkerConfiguration.load(args.worker_id, bs, warn=True) WorkerConfiguration.validate_worker_name(bs, args.worker_id) if worker_config.hostname != WorkerConfiguration.HOSTNAME: log.warn( WRONG_HOSTNAME_MSG.format(worker_config.hostname, WorkerConfiguration.HOSTNAME)) setup_logging(logging.getLogger('binstar_build_client'), args.log_level, args.color, show_tb=args.show_traceback) worker = DockerWorker(bs, worker_config, args) worker.write_stats() worker.work_forever()