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

fix remote envoy capo path

parent eae1dc76
No related branches found
No related tags found
1 merge request!574fix remote envoy capo path
Pipeline #3247 passed
"""fix remote capo path for std_cals
Revision ID: adb4a976c9f8
Revises: 80fee35b748c
Create Date: 2021-10-08 15:04:30.675104
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "adb4a976c9f8"
down_revision = "80fee35b748c"
branch_labels = None
depends_on = None
envoy_script = """#!/bin/sh
set -o errexit
export HOME=$TMPDIR
{{#remote}}
export CAPO_PATH=.
export CAPO_PROFILE={{profile}}
{{/remote}}
./casa_envoy --standard-cal $1 $2
"""
old_script = """#!/bin/sh
set -o errexit
export HOME=$TMPDIR
{{#remote}}
export CAPO_PATH=$(readlink -f $TMPDIR)
export CAPO_PROFILE={{profile}}
{{/remote}}
./casa_envoy --standard-cal $1 $2
"""
def upgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{envoy_script}' WHERE filename='std_calibration_envoy.sh'
"""
)
def downgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{old_script}' WHERE filename='std_calibration_envoy.sh'
"""
)
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