Esempio n. 1
0
def job_worker(_, configuration):
    worker = Worker.from_worker(['jobs'])
    try:
        print('JobWorker has started...')
        worker.run(redis_args(configuration))
    except ConnectionError:
        print(
            'Failed to connect to redis instance [{ip}:{port}], is it running? Check connection arguments and retry.'
            .format(ip=configuration.server, port=configuration.port))
    finally:
        print('JobWorker has finished!')
Esempio n. 2
0
def result_worker(args):
    worker = Worker.from_worker(['results'])
    try:
        print('ResultWorker has started...')
        worker.run(redis_args(args))
    except ConnectionError:
        print(
            'Failed to connect to redis instance [{ip}:{port}], is it running? Check connection arguments and retry.'
            .format(ip=args.redis_host, port=args.redis_port))
    finally:
        print('ResultWorker has finished!')
Esempio n. 3
0
def result_worker(_, configuration):
    worker = Worker.from_worker(['results'])
    try:
        print('ResultWorker has started...')
        worker.run(redis_args(configuration))
    except ConnectionError:
        print(
            'Failed to connect to redis instance [{ip}:{port}], is it running? Check connection arguments and retry.'.format(
                ip=configuration,
                port=configuration))
    finally:
        print('ResultWorker has finished!')