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
Merge requests
!1314
Removed encoding in the pims_notification email template
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Removed encoding in the pims_notification email template
fix-encoded-pims-notification-template
into
main
Overview
0
Commits
1
Pipelines
2
Changes
1
Merged
Nathan Bockisch
requested to merge
fix-encoded-pims-notification-template
into
main
1 year ago
Overview
0
Commits
1
Pipelines
2
Changes
1
Expand
Also made rendering the products per tile list header conditional
0
0
Merge request reports
Compare
main
version 1
4bc60bd9
1 year ago
main (base)
and
latest version
latest version
f6f86c45
1 commit,
1 year ago
version 1
4bc60bd9
1 commit,
1 year ago
1 file
+
91
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
shared/workspaces/alembic/versions/0f3095e84234_unencode_pims_split_email_template.py
0 → 100644
+
91
−
0
Options
"""
unencode pims_split email template
Revision ID: 0f3095e84234
Revises: 762c98a8adf1
Create Date: 2023-04-19 15:10:11.443345
"""
from
alembic
import
op
import
sqlalchemy
as
sa
# revision identifiers, used by Alembic.
revision
=
'
0f3095e84234
'
down_revision
=
'
762c98a8adf1
'
branch_labels
=
None
depends_on
=
None
old_pims_notification
=
b
"""
Subject: PIMS Split Workflow Finished
Dear DA,
{{status}}
Calibration: {{calibration}}
CASA from: {{casa_path}}
Restore path: {{restore_path}}
Lustre processing area: {{lustre_dir}}
Cache directory: {{cache_dir}}
SE Coarse Cube and Continuum images per tile in the database:
{{#num_products}}
- Tile: {{tile_name}}, CC: {{num_coarse_cube}}, SE: {{num_continuum}}
{{/num_products}}
Failed Splits ({{num_failed_splits}}/{{num_splits}}):
{{#failed_splits}}
- {{.}}
{{/failed_splits}}
Best regards,
NRAO Workspaces
"""
new_pims_notification
=
"""
Subject: PIMS Split Workflow Finished
Dear DA,
{{status}}
Calibration: {{calibration}}
CASA from: {{casa_path}}
Restore path: {{restore_path}}
Lustre processing area: {{lustre_dir}}
Cache directory: {{cache_dir}}
{{#num_products.0}}
SE Coarse Cube and Continuum images per tile in the database:
{{/num_products.0}}
{{#num_products}}
- Tile: {{tile_name}}, CC: {{num_coarse_cube}}, SE: {{num_continuum}}
{{/num_products}}
Failed Splits ({{num_failed_splits}}/{{num_splits}}):
{{#failed_splits}}
- {{.}}
{{/failed_splits}}
Best regards,
NRAO Workspaces
"""
def
upgrade
():
conn
=
op
.
get_bind
()
conn
.
execute
(
f
"""
UPDATE notification_templates
SET template=%s WHERE name=
'
pims_notification
'
"""
,
new_pims_notification
)
def
downgrade
():
conn
=
op
.
get_bind
()
conn
.
execute
(
f
"""
UPDATE notification_templates
SET template=%s WHERE name=
'
pims_notification
'
"""
,
old_pims_notification
)
Loading