Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspaces
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
workspaces
Commits
bc0b7267
Commit
bc0b7267
authored
2 years ago
by
Nathan Bockisch
Browse files
Options
Downloads
Patches
Plain Diff
Added script sketch for review
parent
c7074643
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1076
WS-1013: Create the pims_split Workspaces workflow
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
shared/workspaces/alembic/versions/e8e6d54d8444_add_pimscache_split_workflow.py
+86
-0
86 additions, 0 deletions
...bic/versions/e8e6d54d8444_add_pimscache_split_workflow.py
with
86 additions
and
0 deletions
shared/workspaces/alembic/versions/e8e6d54d8444_add_pimscache_split_workflow.py
0 → 100644
+
86
−
0
View file @
bc0b7267
"""
add pimscache split workflow
Revision ID: e8e6d54d8444
Revises: 55e5b37d1ccf
Create Date: 2022-09-21 11:19:03.245980
"""
from
alembic
import
op
import
sqlalchemy
as
sa
# revision identifiers, used by Alembic.
revision
=
'
e8e6d54d8444
'
down_revision
=
'
55e5b37d1ccf
'
branch_labels
=
None
depends_on
=
None
# Main DAG for the workflow
pims_split_dag
=
"""
JOB RESTORE restore_cms_content.condor
VARS RESTORE jobname=
"
$(JOB)
"
{#phase_centers}
JOB {{center_name}} split.sub
VARS {{center_name}} phase_center={{phase_center}}
{/phase_centers}
JOB FINISH write_finished_file.condor
PARENT RESTORE CHILD SPLIT
PARENT SPLIT CHILD FINISH
"""
# DAG run on each split
split_dag
=
"""
JOB SPLITWF split_workflow.condor
PARENT SPLITWF
"""
restore_cms_content
=
"""
executable = restore_cms.sh
"""
split_workflow_condor
=
"""
split_workflow.sh
"""
split_workflow_sh
=
"""
#!/bin/sh
set -o errexit
# Something to link measurement set to rawdata directory
# CASA envoy call?
# Populate the cache area
"""
# Finish file creation
write_finished_file_condor
=
"""
write_finished_file.sh
output = write_finished.out
error = write_finished.err
log = condor.log
"""
write_finished_file_sh
=
"""
#!/bin/sh
set -o errexit
/bin/date > finished
"""
def
upgrade
():
op
.
execute
(
"""
INSERT INTO workflows (workflow_name) VALUES (
'
pims_split
'
)
"""
)
op
.
execute
(
f
"""
INSERT INTO workflow_templates (filename, content, workflow_name)
VALUES (
'
pims_split.dag
'
, E
'
{
pims_split_dag
}
'
,
'
pims_split
'
)
"""
)
pass
def
downgrade
():
pass
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment