Skip to content
Snippets Groups Projects

restore capability and workflow

Merged Charlotte Hausman requested to merge Restore_Capability into main
All threads resolved!
1 file
+ 64
4
Compare changes
  • Side-by-side
  • Inline
@@ -15,7 +15,7 @@ down_revision = "a7c2b4682aae"
branch_labels = None
depends_on = None
restore_condor_content = """executable = restore_cms.sh
condor_content = """executable = restore_cms.sh
arguments = {{product_locator}} {{cal_product_locator}} {{request_id}} metadata.json PPR.xml
output = restore.out
@@ -35,7 +35,7 @@ queue
"""
restore_script_content = """#!/bin/sh
script_content = """#!/bin/sh
export HOME=$TMPDIR
@@ -71,6 +71,60 @@ metadata_content = """{
"""
ppr_content = """<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:SciPipeRequest xmlns:ns2="Common/pipelinescience/SciPipeRequest">
<ProjectSummary>
<ProposalCode>VLA/null</ProposalCode>
<Observatory>NRAO</Observatory>
<Telescope>VLA</Telescope>
<ProcessingSite>Socorro</ProcessingSite>
<Operator>vlapipe</Operator>
<Mode>SCIENCE</Mode>
<Version>NGRH-ALMA-10_8</Version>
<CreationTime>{{created_at}}</CreationTime>
</ProjectSummary>
<ProjectStructure>TBD</ProjectStructure>
<ProcessingRequests>
<RootDirectory>{{root_directory}}</RootDirectory>
<ProcessingRequest>
<ProcessingIntents>
<Intents>
<Keyword>VLA_INTERFEROMETRY_STANDARD_OBSERVING_MODE</Keyword>
<Value>Undefined</Value>
</Intents>
</ProcessingIntents>
<ProcessingProcedure>
<ProcedureTitle>Workspaces Restore</ProcedureTitle>
<ProcessingCommand>
<Command>hifv_restoredata</Command>
<ParameterSet/>
</ProcessingCommand>
<ProcessingCommand>
<Command>hifv_statwt</Command>
<ParameterSet/>
</ProcessingCommand>
</ProcessingProcedure>
<DataSet>
<RelativePath>{{relative_path}}</RelativePath>
<SdmIdentifier>{{sdmId}}</SdmIdentifier>
<DataType>asdm</DataType>
</DataSet>
</ProcessingRequest>0
</ProcessingRequests>
<ResultsProcessing>
<ArchiveResults>false</ArchiveResults>
<CleanUpDisk>false</CleanUpDisk>
<UpdateProjectLifeCycle>false</UpdateProjectLifeCycle>
<NotifyOperatorWhenDone>false</NotifyOperatorWhenDone>
<SDMall>false</SDMall>
<SDMonly>false</SDMonly>
<PipelineOperatorAddress>Unknown</PipelineOperatorAddress>
</ResultsProcessing>
</ns2:SciPipeRequest>
"""
def upgrade():
restore_steps = """prepare-and-run-workflow restore_cms
await-workflow
@@ -93,13 +147,13 @@ await-qa
op.execute(
f"""
INSERT INTO workflow_templates (filename, content, workflow_name)
VALUES ('restore_cms.condor', E'{restore_condor_content}', 'restore_cms')
VALUES ('restore_cms.condor', E'{condor_content}', 'restore_cms')
"""
)
op.execute(
f"""
INSERT INTO workflow_templates (filename, content, workflow_name)
VALUES ('restore_cms.sh', E'{restore_script_content}', 'restore_cms')
VALUES ('restore_cms.sh', E'{script_content}', 'restore_cms')
"""
)
op.execute(
@@ -108,6 +162,12 @@ await-qa
VALUES ('metadata.json', E'{metadata_content}', 'restore_cms')
"""
)
op.execute(
f"""
INSERT INTO workflow_templates (filename, content, workflow_name)
VALUES ('PPR.xml', E'{ppr_content}', 'restore_cms')
"""
)
def downgrade():
Loading