From 79baa92a7ebee5f51aab4e0563b012bf302e7ae3 Mon Sep 17 00:00:00 2001 From: chausman <chausman@nrao.edu> Date: Fri, 19 May 2023 09:41:23 -0600 Subject: [PATCH] make VLASS calibration run on VLASS nodes --- .../1f32110d170d_move_vlass_cal_nodes.py | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 shared/workspaces/alembic/versions/1f32110d170d_move_vlass_cal_nodes.py diff --git a/shared/workspaces/alembic/versions/1f32110d170d_move_vlass_cal_nodes.py b/shared/workspaces/alembic/versions/1f32110d170d_move_vlass_cal_nodes.py new file mode 100644 index 000000000..c090c2dfd --- /dev/null +++ b/shared/workspaces/alembic/versions/1f32110d170d_move_vlass_cal_nodes.py @@ -0,0 +1,42 @@ +"""move vlass cal nodes + +Revision ID: 1f32110d170d +Revises: 762c98a8adf1 +Create Date: 2023-05-19 09:29:36.233260 + +""" +from alembic import op + + +# revision identifiers, used by Alembic. +revision = "1f32110d170d" +down_revision = "0f3095e84234" +branch_labels = None +depends_on = None + + +old_requirement = """requirements = HasLustre == True""" + +new_requirement = """requirements = (VLASS == True) && (HasLustre == True) ++partition = "VLASS" +""" + + +def upgrade(): + op.execute( + f""" + UPDATE workflow_templates + SET content = replace(convert_from(content, 'utf8'), E'{old_requirement}', E'{new_requirement}')::bytea + WHERE workflow_name = 'vlass_calibration' + """ + ) + + +def downgrade(): + op.execute( + f""" + UPDATE workflow_templates + SET content = replace(convert_from(content, 'utf8'), E'{new_requirement}', E'{old_requirement}')::bytea + WHERE workflow_name = 'vlass_calibration' + """ + ) -- GitLab