Skip to content

sgnl.bin.dagger

prepare_osdf_support(config, dag_dir)

Prepare config for OSDF frame support by flattening any OSDF frame caches. Call this once after loading config, before any workflow generation.

Source code in sgnl/bin/dagger.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
def prepare_osdf_support(config, dag_dir):
    """
    Prepare config for OSDF frame support by flattening any OSDF frame caches.
    Call this once after loading config, before any workflow generation.
    """
    if config.source and config.source.frame_cache:
        flat_cache_path = os.path.join(dag_dir, "flat_frame_cache.cache")
        result = osdf_flatten_frame_cache(
            config.source.frame_cache, new_cache_name=flat_cache_path
        )
        (
            config.source.frames_in_osdf,
            config.source.transfer_frame_cache,
        ) = result

    if config.source and config.source.inj_frame_cache:
        flat_inj_cache_path = os.path.join(dag_dir, "flat_inj_frame_cache.cache")
        result = osdf_flatten_frame_cache(
            config.source.inj_frame_cache, new_cache_name=flat_inj_cache_path
        )
        (
            config.source.inj_frames_in_osdf,
            config.source.transfer_inj_frame_cache,
        ) = result