Skip to content
Snippets Groups Projects
Commit 14ed8893 authored by Nathan Bockisch's avatar Nathan Bockisch Committed by Charlotte Hausman
Browse files

WS-1242: Added new workflow for vlass image caching

parent 9194e655
No related branches found
No related tags found
1 merge request!1089WS-1242: Added new workflow for vlass image caching
Pipeline #6892 passed
"""Add VLASS image caching workflow
Revision ID: 4c3bfbdd2984
Revises: c5b3f866d904
Create Date: 2022-10-05 10:33:48.765845
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '4c3bfbdd2984'
down_revision = 'c5b3f866d904'
branch_labels = None
depends_on = None
vlass_image_caching_condor = """executable = vlass_image_caching.sh
arguments = {{calibration_name}} {{phase_center}} {{vlass_relative_path}} {{qa_status}}
output = image_caching.out
error = image_caching.err
log = condor.log
PIMS_PATH = /lustre/aoc/cluster/pipeline/vlass_{{vlass_env}}/workspaces/bin
VLASS_DIR = {{data_location}}
should_transfer_files = yes
transfer_input_files = $ENV(HOME)/.ssh/condor_transfer, nraorsync://$(SBIN_PATH)/pycapo, nraorsync://$(PIMS_PATH)/pimscache, nraorsync://$(PIMS_PATH)/cacheImagingProducts.sh
when_to_transfer_output = ON_EXIT
transfer_output_files = .job.ad
output_destination = nraorsync://$(VLASS_DIR)
+WantIOProxy = True
environment = "CAPO_PATH=/home/casa/capo"
requirements = (VLASS == True) && (HasLustre == True)
+partition = "VLASS"
queue
"""
vlass_image_caching_sh = """#!/bin/sh
set -o errexit
./pimscache -rm -c $1 -p $2
./cacheImagingProducts.sh -p $3 -s $4
"""
def upgrade():
op.execute(
"""
INSERT INTO workflows (workflow_name) VALUES ('vlass_image_caching')
"""
)
op.execute(
f"""
INSERT INTO workflow_templates (filename, content, workflow_name)
VALUES ('vlass_image_caching.condor', E'{vlass_image_caching_condor}', 'vlass_image_caching')
"""
)
op.execute(
f"""
INSERT INTO workflow_templates (filename, content, workflow_name)
VALUES ('vlass_image_caching.sh', E'{vlass_image_caching_sh}', 'vlass_image_caching')
"""
)
def downgrade():
op.execute(
"""
DELETE FROM workflow_templates WHERE workflow_name = 'vlass_image_caching'
"""
)
op.execute(
"""
DELETE FROM workflows WHERE workflow_name = 'vlass_image_caching'
"""
)
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