def test_manager_standalone(store_path): small_bbox = Bbox(left=8.83848086, bottom=47.2218996495, right=8.8388215005, top=47.2220713398) manager = Manager(bbox=small_bbox, standalone=True, configuration=Configuration(dict(bbox_size=50, compare=False))) manager.run() with open(store_path, 'r') as f: data = json.load(f) assert len(data['nodes']) == 1
def manager(args, configuration): big_bbox = Bbox(left=args.bb_left, bottom=args.bb_bottom, right=args.bb_right, top=args.bb_top) try: print('Manager has started...') manage = Manager(bbox=big_bbox, configuration=configuration, standalone=args.standalone) manage.run() except ConnectionError: print( 'Failed to connect to redis instance [{ip}:{port}], is it running? Check connection arguments and retry.'.format( ip=configuration.REDIS.server, port=configuration.REDIS.port)) finally: print('Manager has finished!')
def test_manager_standalone(store_path): small_bbox = Bbox(left=8.83848086, bottom=47.2218996495, right=8.8388215005, top=47.2220713398) manager = Manager(bbox=small_bbox, standalone=True, configuration=Configuration( dict(bbox_size=50, compare=False))) manager.run() with open(store_path, 'r') as f: data = json.load(f) assert len(data['nodes']) == 1
def manager(args, configuration): big_bbox = Bbox(left=args.bb_left, bottom=args.bb_bottom, right=args.bb_right, top=args.bb_top) try: print('Manager has started...') manage = Manager(big_bbox, 'jobs', configuration, args.standalone) manage.run() 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('Manager has finished!')
def test_manager_standalone(store_path, configuration_no_compare): small_bbox = Bbox(left=9.351172, bottom=47.098195, right=9.351301, top=47.098480) configuration_no_compare.DETECTION.bboxsize = 50 manager = Manager(bbox=small_bbox, standalone=True, configuration=configuration_no_compare) manager.run() with open(store_path, 'r') as f: data = json.load(f) assert len(data['nodes']) == 1