Skip to content
Snippets Groups Projects
Commit 60b89aa1 authored by Charlotte Hausman's avatar Charlotte Hausman
Browse files

fixing missing getenv in download templates - oops

parent b56c609e
No related branches found
Tags end-of-sprint-16.999
1 merge request!549fixing missing getenv in download templates - oops
Pipeline #3142 passed
"""fix download template
Revision ID: 548680252212
Revises: 4e009168b3bf
Create Date: 2021-09-29 10:00:00.636702
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "548680252212"
down_revision = "4e009168b3bf"
branch_labels = None
depends_on = None
condor = """executable = test_download.sh
arguments = {{product_locator}} {{request_id}}
output = test_download.out
error = test_download.err
log = condor.log
SBIN_PATH = /lustre/aoc/cluster/pipeline/$ENV(CAPO_PROFILE)/workspaces/sbin
should_transfer_files = yes
transfer_input_files = $(SBIN_PATH)/pycapo, $(SBIN_PATH)/productfetcher, $(SBIN_PATH)/deliver{{#remote-cv}}, {{profile}}.properties{{/remote-cv}}
{{^remote-cv}}
getenv = True
environment = "CAPO_PATH=/home/casa/capo"
requirements = HasLustre == True
{{/remote-cv}}
{{#remote-cv}}
environment = "CAPO_PATH=. CAPO_PROFILE={{profile}}"
requirements = HasLustre == True && (CVPOST == True)
+partition = "CVPOST"
{{/remote-cv}}
queue
"""
old_condor = """executable = test_download.sh
arguments = {{product_locator}} {{request_id}}
output = test_download.out
error = test_download.err
log = condor.log
SBIN_PATH = /lustre/aoc/cluster/pipeline/$ENV(CAPO_PROFILE)/workspaces/sbin
should_transfer_files = yes
transfer_input_files = $(SBIN_PATH)/pycapo, $(SBIN_PATH)/productfetcher, $(SBIN_PATH)/deliver{{#remote-cv}}, {{profile}}.properties{{/remote-cv}}
{{^remote-cv}}
environment = "CAPO_PATH=/home/casa/capo"
requirements = HasLustre == True
{{/remote-cv}}
{{#remote-cv}}
environment = "CAPO_PATH=. CAPO_PROFILE={{profile}}"
requirements = HasLustre == True && (CVPOST == True)
+partition = "CVPOST"
{{/remote-cv}}
queue
"""
def upgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{condor}' WHERE filename='test_download.condor'
"""
)
def downgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{old_condor}' WHERE filename='test_download.condor'
"""
)
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