Skip to content
Snippets Groups Projects

WS-645: Move images out of subdirectories

Merged Charlotte Hausman requested to merge WS-673_fix_single_img_crash_issue into main
1 file
+ 64
0
Compare changes
  • Side-by-side
  • Inline
"""fix single image carta
Revision ID: 01de4f42cf27
Revises: b3667e00ef4a
Create Date: 2021-09-13 11:39:00.808773
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "01de4f42cf27"
down_revision = "b3667e00ef4a"
branch_labels = None
depends_on = None
script_content = """#!/bin/sh
set -o errexit
export HOME=$TMPDIR
{{#need_data}}
./framework.sh -r .
chmod 770 .
cd rawdata/
../productfetcher{{product_locator}} {{^single_image}}&{{/single_image}}
.{{/need_data}}./carta_envoy {{#need_data}}--parallel{{/need_data}} {{#single_image}}--single -i {{imageName}}{{/single_image}} -d $1 -n $2 -wf $3 -r $4
{{#need_data}}wait{{/need_data}}
"""
old_content = """#!/bin/sh
set -o errexit
export HOME=$TMPDIR
{{#need_data}}
./framework.sh -r .
chmod 770 .
cd rawdata/
../productfetcher{{product_locator}} &
.{{/need_data}}./carta_envoy {{#need_data}}--parallel{{/need_data}} {{#single_image}}--single -i {{imageName}}{{/single_image}} -d $1 -n $2 -wf $3 -r $4
{{#need_data}}wait{{/need_data}}
"""
def upgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{script_content}' WHERE filename='carta.sh'
"""
)
def downgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{old_content}' WHERE filename='carta.sh'
"""
)
Loading