Skip to content
Snippets Groups Projects
Commit f6f86c45 authored by Nathan Bockisch's avatar Nathan Bockisch
Browse files

Removed encoding in the pims_notification email template

parent 8fab1ff5
No related branches found
No related tags found
2 merge requests!1390Catch up with Main,!1314Removed encoding in the pims_notification email template
Pipeline #9446 passed
"""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
)
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