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

update templates for CV NAASC carta and download execution

parent a3e49f18
No related branches found
No related tags found
1 merge request!522update templates for CV NAASC carta and download execution
Pipeline #2976 passed
"""update download and carta for naasc
Revision ID: d8f7f2fe2ae9
Revises: f1c9ee975883
Create Date: 2021-09-20 10:37:42.036818
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "d8f7f2fe2ae9"
down_revision = "f1c9ee975883"
branch_labels = None
depends_on = None
carta_content = """executable = carta.sh
arguments = {{source_dir}} {{user_email}} {{request_id}} {{notify_ready}}
output = carta.out
error = carta.err
log = condor.log
SBIN_PATH = /lustre/aoc/cluster/pipeline/$ENV(CAPO_PROFILE)/workspaces/sbin
should_transfer_files = yes
transfer_input_files = $(SBIN_PATH)/pycapo, $(SBIN_PATH)/framework.sh, $(SBIN_PATH)/carta_url_template.html, $(SBIN_PATH)/productfetcher, $(SBIN_PATH)/carta_envoy{{#remote-cv}}, {{profile}}.properties{{/remote-cv}}
{{#need_data}}transfer_output_files = rawdata{{/need_data}}
request_memory = {{ramInGb}}
getenv = True
{{^remote-cv}}
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
"""
download_content = """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 = $(SBIN_PATH)/pycapo, $(SBIN_PATH)/productfetcher, $(SBIN_PATH)/deliver{{#remote-cv}}, {{profile}}.properties{{/remote-cv}}
{{^remote-cv}}
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
"""
old_carta = """executable = carta.sh
arguments = {{source_dir}} {{user_email}} {{request_id}} {{notify_ready}}
output = carta.out
error = carta.err
log = condor.log
SBIN_PATH = /lustre/aoc/cluster/pipeline/$ENV(CAPO_PROFILE)/workspaces/sbin
should_transfer_files = yes
transfer_input_files = $(SBIN_PATH)/pycapo, $(SBIN_PATH)/framework.sh, $(SBIN_PATH)/productfetcher, $(SBIN_PATH)/carta_envoy
{{#need_data}}transfer_output_files = rawdata{{/need_data}}
request_memory = {{ramInGb}}
getenv = True
environment = "CAPO_PATH=/home/casa/capo"
requirements = HasLustre == True
queue
"""
old_download = """executable = test_download.sh
arguments = {{product_locator}} {{request_id}}
output = test_download.out
error = test_download.err
log = test_download.log
SBIN_PATH = /lustre/aoc/cluster/pipeline/$ENV(CAPO_PROFILE)/workspaces/sbin
should_transfer_files = yes
transfer_input_files = $(SBIN_PATH)/productfetcher, $(SBIN_PATH)/deliver
getenv = True
environment = "CAPO_PATH=/home/casa/capo"
requirements = HasLustre == True
queue
"""
def upgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{carta_content}' WHERE filename='carta.condor'
"""
)
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{download_content}' WHERE filename='test_download.condor'
"""
)
def downgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{old_carta}' WHERE filename='carta.condor'
"""
)
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{old_download}' WHERE filename='test_download.condor'
"""
)
......@@ -83,4 +83,4 @@ class ViewWorkflowCapoParameters:
if wf == RemoteWorkflows.DOWNLOAD and RemoteProcessingSites.NAASC.value in self.request.argument:
return ListView(self.delivery_parameters() + self.fetcher_parameters())
if wf == RemoteWorkflows.CARTA and RemoteProcessingSites.NAASC.value in self.request.argument:
return ListView(self.general_parameters() + self.carta_parameters())
return ListView(self.general_parameters() + self.fetcher_parameters() + self.carta_parameters())
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