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

ensure VLASS workflows only run on VLASS nodes

parent e7d508d5
No related branches found
No related tags found
1 merge request!1093ensure VLASS workflows only run on VLASS nodes
Pipeline #6930 passed
"""correct vlass wfs to use vlass nodes
Revision ID: dc83011fcd2f
Revises: 4c3bfbdd2984
Create Date: 2022-10-06 09:58:37.473495
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = "dc83011fcd2f"
down_revision = "4c3bfbdd2984"
branch_labels = None
depends_on = None
affected_workflows = (
"pims_split",
"vlass_calibration",
"vlass_coarse",
"vlass_quicklook",
"vlass_seci",
"vlass_image_caching",
)
def upgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content= regexp_replace(convert_from(content, 'utf-8'),
E'requirements = HasLustre == True',
E'requirements = (VLASS == True) && (HasLustre == True)\\n+partition = "VLASS"')::bytea
WHERE workflow_name in {str(affected_workflows)} AND filename like ('%.condor')
"""
)
def downgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content= regexp_replace(convert_from(content, 'utf-8'),
E'requirements = (VLASS == True) && (HasLustre == True)\\n+partition = "VLASS"',
E'requirements = HasLustre == True')::bytea
WHERE workflow_name in {str(affected_workflows)} AND filename like ('%.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