Skip to content
Snippets Groups Projects
Commit 089b46f3 authored by chaskar2's avatar chaskar2
Browse files

debugging issues with git parameters

parent 09e500f6
Branches assignment1.2
No related tags found
No related merge requests found
......@@ -93,17 +93,6 @@ default_args = {
@dag(start_date=datetime(2021, 1,1), schedule_interval='@daily', catchup=False, default_args=default_args,)
def imageflow_dag(**dag_input):
# Set the base path and base output path default values
run_id = time.strftime("%Y-%m-%d--%H-%M-%S", time.gmtime())
base_path = "/scan_params/" + run_id
base_output_path = "/gate_output_pipeline/" + run_id
Variable.set(key="base_path", value=base_path)
Variable.set(key="base_output_path", value=base_output_path)
Variable.set(key="run_id", value=run_id)
# Create gate volume and volume mounts
gate_volume = k8s.V1Volume(name="imageflow-gate-volume",persistent_volume_claim=k8s.V1PersistentVolumeClaimVolumeSource(claim_name="gate-disk"))
......@@ -215,6 +204,13 @@ def imageflow_dag(**dag_input):
Returns:
int: The return value indicating the success of the function (always 0 in this case)
"""
base_path = "/scan_params/" + kwargs['dag_run'].conf.get('run_id')
base_output_path = "/gate_output_pipeline/" + kwargs['dag_run'].conf.get('run_id')
Variable.set(key="base_path", value=base_path)
Variable.set(key="base_output_path", value=base_output_path)
# Create the base path directory if it doesn't exist
if not os.path.exists(f"{Variable.get('base_path')}"):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment