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

adding requested memory to download condor submit file

parent 65c9eff4
No related branches found
Tags end-of-sprint-16.999
1 merge request!850adding requested memory to download condor submit file
Pipeline #4629 passed
"""request memory for downloads
Revision ID: 452f9923d108
Revises: 0c62d7748b11
Create Date: 2022-03-14 10:08:34.456063
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "452f9923d108"
down_revision = "0c62d7748b11"
branch_labels = None
depends_on = None
old_script = """executable = test_download.sh
arguments = {{product_locator}} {{request_id}}
output = test_download.out
error = test_download.err
log = condor.log
SBIN_PATH = /lustre/aoc/cluster/pipeline/$ENV(CAPO_PROFILE)/workspaces/sbin
should_transfer_files = yes
transfer_input_files = $ENV(HOME)/.ssh/condor_transfer, nraorsync://$(SBIN_PATH)/pycapo, nraorsync://$(SBIN_PATH)/productfetcher, nraorsync://$(SBIN_PATH)/deliver{{#remote-cv}}, nraorsync://{{spool_dir}}/{{profile}}.properties{{/remote-cv}}
+WantIOProxy = True
{{^remote-cv}}
getenv = True
environment = "CAPO_PATH=/home/casa/capo"
requirements = HasLustre == True
{{/remote-cv}}
{{#remote-cv}}
environment = "CAPO_PATH=. CAPO_PROFILE={{profile}}"
requirements = HasLustre == True && (CVPOST == True)
+partition = "CVPOST"
{{/remote-cv}}
queue
"""
new_script = """executable = test_download.sh
arguments = {{product_locator}} {{request_id}}
output = test_download.out
error = test_download.err
log = condor.log
SBIN_PATH = /lustre/aoc/cluster/pipeline/$ENV(CAPO_PROFILE)/workspaces/sbin
should_transfer_files = yes
transfer_input_files = $ENV(HOME)/.ssh/condor_transfer, nraorsync://$(SBIN_PATH)/pycapo, nraorsync://$(SBIN_PATH)/productfetcher, nraorsync://$(SBIN_PATH)/deliver{{#remote-cv}}, nraorsync://{{spool_dir}}/{{profile}}.properties{{/remote-cv}}
+WantIOProxy = True
request_memory = 2G
{{^remote-cv}}
getenv = True
environment = "CAPO_PATH=/home/casa/capo"
requirements = HasLustre == True
{{/remote-cv}}
{{#remote-cv}}
environment = "CAPO_PATH=. CAPO_PROFILE={{profile}}"
requirements = HasLustre == True && (CVPOST == True)
+partition = "CVPOST"
{{/remote-cv}}
queue
"""
def upgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{new_script}' WHERE filename='test_download.condor'
"""
)
def downgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{old_script}' WHERE filename='test_download.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