Skip to content

Commit

Permalink
Korjattu if-lausetta run-skriptissä
Browse files Browse the repository at this point in the history
  • Loading branch information
augustk committed Jan 30, 2025
1 parent 5492ef0 commit c1dd025
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions cdk/lib/ecs-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,10 @@ export class EcsStack extends cdk.Stack {
ecsProsessiOnKaynnissaTable.grantReadWriteData(
lampiSiirtajaScheduledFargateTask.taskDefinition.taskRole
);
ecsProsessiOnKaynnissaTable.grant(
lampiSiirtajaScheduledFargateTask.taskDefinition.taskRole,
...['dynamodb:PartiQLSelect', 'dynamodb:PartiQLUpdate']
);

lampiSiirtajaScheduledFargateTask.taskDefinition.addToExecutionRolePolicy(
new iam.PolicyStatement({
Expand Down
3 changes: 2 additions & 1 deletion dbt-container/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ cd dbt
. venv/bin/activate

IS_RUNNING=$(aws dynamodb execute-statement --statement "SELECT onKaynnissa FROM ecsProsessiOnKaynnissa WHERE prosessi='dbt-scheduled-task'" | jq ' .Items.[0].onKaynnissa.S ')
if [ $IS_RUNNING == "true" ] ; then
echo "Onko edellinen ajo käynnissä: $IS_RUNNING"
if [[ "$IS_RUNNING" == "true" ]]; then
echo "ERROR: Edellinen ajo on vielä käynnissä."
exit 1
fi
Expand Down
3 changes: 2 additions & 1 deletion lampi-siirtaja-container/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -e
echo "Running Lampi-siirtäjä..."

IS_RUNNING=$(aws dynamodb execute-statement --statement "SELECT onKaynnissa FROM ecsProsessiOnKaynnissa WHERE prosessi='lampi-scheduled-task'" | jq ' .Items.[0].onKaynnissa.S ')
if [ $IS_RUNNING == "true" ] ; then
echo "Onko edellinen ajo käynnissä: $IS_RUNNING"
if [[ "$IS_RUNNING" == "true" ]]; then
echo "ERROR: Edellinen ajo on vielä käynnissä."
exit 1
fi
Expand Down

0 comments on commit c1dd025

Please sign in to comment.