def process_scene_set_internal(args, scene_ids, scene_list_file):
    run_id = pusher.acquire_run_id('(l8_process_run.py)',
                                   force=args.break_run_lock)

    run_file = 'this_run.csv'
    scene_info.init_list_file(run_file)

    results = []
    for scene_id in scene_ids:

        scene_dict = l8_process_scene.process(args.source,
                                              scene_id,
                                              clean=True,
                                              verbose=args.verbose)

        if scene_dict is not None:
            open(run_file,
                 'a').write(scene_info.make_scene_line(scene_dict) + '\n')
            open(scene_list_file,
                 'a').write(scene_info.make_scene_line(scene_dict) + '\n')

    pusher.upload_run_list(run_id,
                           run_file,
                           scene_list_file,
                           verbose=args.verbose)
def process_scene_set_internal(args, scene_ids, scene_list_file):
    run_id = pusher.acquire_run_id('(l8_process_run.py)',
                                   force=args.break_run_lock)

    run_file = 'this_run.csv'
    scene_info.init_list_file(run_file)

    results = []
    for scene_id in scene_ids:

        scene_dict = l8_process_scene.process(
            args.source, scene_id,
            clean = True,
            verbose = args.verbose)

        if scene_dict is not None:
            open(run_file,'a').write(
                scene_info.make_scene_line(scene_dict)+'\n')
            open(scene_list_file,'a').write(
                scene_info.make_scene_line(scene_dict)+'\n')

    pusher.upload_run_list(run_id, run_file, scene_list_file,
                           verbose = args.verbose)
def process_scene_set_external(args, scene_ids, scene_list_file):
    run_id = pusher.acquire_run_id('(l8_process_run.py)',
                                   force=args.break_run_lock)

    run_file = 'this_run.csv'
    scene_info.init_list_file(run_file)

    in_file = 'this_run.lst'
    open(in_file,'w').write(('\n'.join(scene_ids)) + '\n')
    
    cmd = 'parallel -j 6 %s %s -l %s < %s' % (
        'l8_process_scene.py',
        '--verbose' if args.verbose else '',
        run_file,
        in_file)
    if args.verbose:
        print cmd
    rc = os.system(cmd)
    
    new_lines = open(run_file).read().strip().split('\n')[1:]
    open(scene_list_file,'a').write(('\n'.join(new_lines)) + '\n')

    pusher.upload_run_list(run_id, run_file, scene_list_file,
                           verbose = args.verbose)
def process_scene_set_external(args, scene_ids, scene_list_file):
    run_id = pusher.acquire_run_id('(l8_process_run.py)',
                                   force=args.break_run_lock)

    run_file = 'this_run.csv'
    scene_info.init_list_file(run_file)

    in_file = 'this_run.lst'
    open(in_file, 'w').write(('\n'.join(scene_ids)) + '\n')

    cmd = 'parallel -j 6 %s %s -l %s < %s' % ('l8_process_scene.py',
                                              '--verbose' if args.verbose else
                                              '', run_file, in_file)
    if args.verbose:
        print cmd
    rc = os.system(cmd)

    new_lines = open(run_file).read().strip().split('\n')[1:]
    open(scene_list_file, 'a').write(('\n'.join(new_lines)) + '\n')

    pusher.upload_run_list(run_id,
                           run_file,
                           scene_list_file,
                           verbose=args.verbose)