Skip to content
Snippets Groups Projects
Commit 896ef452 authored by Nathan Bockisch's avatar Nathan Bockisch
Browse files

Added comma to write finished file section of pims_split

parent cda4af36
No related branches found
No related tags found
1 merge request!1300Correcting the pims_split metadata and dag files to iterate over the splits
Pipeline #9368 passed
# Copyright (C) 2023 Associated Universities, Inc. Washington DC, USA.
#
# This file is part of NRAO Workspaces.
#
# Workspaces is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Workspaces is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Workspaces. If not, see <https://www.gnu.org/licenses/>.
#
"""pims split quicklook corrections
Revision ID: 762c98a8adf1
......@@ -5,13 +22,12 @@ Revises: e00812d93608
Create Date: 2023-04-14 12:25:42.235329
"""
from alembic import op
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '762c98a8adf1'
down_revision = 'e00812d93608'
revision = "762c98a8adf1"
down_revision = "e00812d93608"
branch_labels = None
depends_on = None
......@@ -35,17 +51,89 @@ old_condor_args = 'arguments = "$(split_dir)" "$(quicklook_url)"'
new_condor_args = 'arguments = "$(split_dir)"{{#quicklook_url}} "$(quicklook_url)"{{/quicklook_url}}'
# Add that pesky comma when transferring input files
old_write_finished_file_condor = """executable = write_finished_file.sh
output = write_finished.out
error = write_finished.err
log = condor.log
SBIN_PATH = /lustre/aoc/cluster/pipeline/$ENV(CAPO_PROFILE)/workspaces/sbin
SPOOL_DIR = {{spool_dir}}
should_transfer_files = yes
transfer_input_files = $ENV(HOME)/.ssh/condor_transfer, nraorsync://$(SBIN_PATH)/pycapo nraorsync://$(SBIN_PATH)/pims_analyzer
transfer_output_files = .job.ad
+nrao_output_files = "finished"
output_destination = nraorsync://$(SPOOL_DIR)
+WantIOProxy = True
getenv = True
environment = "CAPO_PATH=/home/casa/capo"
requirements = (VLASS == True) && (HasLustre == True)
+partition = "VLASS"
queue
"""
new_write_finished_file_condor = """executable = write_finished_file.sh
output = write_finished.out
error = write_finished.err
log = condor.log
SBIN_PATH = /lustre/aoc/cluster/pipeline/$ENV(CAPO_PROFILE)/workspaces/sbin
SPOOL_DIR = {{spool_dir}}
should_transfer_files = yes
transfer_input_files = $ENV(HOME)/.ssh/condor_transfer, nraorsync://$(SBIN_PATH)/pycapo, nraorsync://$(SBIN_PATH)/pims_analyzer
transfer_output_files = .job.ad
+nrao_output_files = "finished"
output_destination = nraorsync://$(SPOOL_DIR)
+WantIOProxy = True
getenv = True
environment = "CAPO_PATH=/home/casa/capo"
requirements = (VLASS == True) && (HasLustre == True)
+partition = "VLASS"
queue
"""
def upgrade():
op.execute(f"""
op.execute(
f"""
UPDATE workflow_templates
SET content = E'{new_metadata}'
WHERE workflow_name = 'pims_split' AND filename = 'metadata.json'
""")
WHERE workflow_name = 'pims_split' AND filename = 'metadata.json'
"""
)
op.execute(
f"""
UPDATE workflow_templates
SET content = E'{new_write_finished_file_condor}'
WHERE workflow_name = 'pims_split' AND filename = 'write_finished_file.condor'
"""
)
def downgrade():
op.execute(f"""
op.execute(
f"""
UPDATE workflow_templates
SET content = E'{old_metadata}'
WHERE workflow_name = 'pims_split' AND filename = 'metadata.json'
""")
WHERE workflow_name = 'pims_split' AND filename = 'metadata.json'
"""
)
op.execute(
f"""
UPDATE workflow_templates
SET content = E'{old_write_finished_file_condor}'
WHERE workflow_name = 'pims_split' AND filename = 'write_finished_file.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