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

update workflow definitions for lustre only

parent 196e7c55
No related branches found
Tags end-of-sprint-16.999
4 merge requests!1195rebase 2.8,!1192Catch up with main 2.8,!1186Catch up with main 2.8,!1160update workflow definitions for lustre only
Pipeline #7682 canceled
"""update workflow definitions for lustre only
Revision ID: 510e4dc5a691
Revises: 3b57b123d982
Create Date: 2022-12-12 14:29:39.784273
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = "510e4dc5a691"
down_revision = "3b57b123d982"
branch_labels = None
depends_on = None
def upgrade():
change_dict = {
"std_calibration": [True, False],
"std_cms_imaging": [True, False],
"std_restore_imaging": [True, False],
"restore_cms": [True, False],
"vlass_calibration": [True, False],
}
for wf in change_dict:
op.execute(
f"""
UPDATE workflows
SET requires_lustre={change_dict[wf][0]}
WHERE workflow_name='{wf}'
"""
)
op.execute(
f"""
UPDATE workflows
SET remote_capable={change_dict[wf][1]}
WHERE workflow_name='{wf}'
"""
)
def downgrade():
revert_dict = {
"std_calibration": [False, True],
"std_cms_imaging": [False, True],
"std_restore_imaging": [False, True],
"restore_cms": [False, True],
"vlass_calibration": [False, True],
}
for wf in revert_dict:
op.execute(
f"""
UPDATE workflows
SET requires_lustre={revert_dict[wf][0]}
WHERE workflow_name='{wf}'
"""
)
op.execute(
f"""
UPDATE workflows
SET remote_capable={revert_dict[wf][1]}
WHERE workflow_name='{wf}'
"""
)
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