Skip to content

Commit

Permalink
palautettu migraatiolambda deploy workflowhun ja siivouslambdaan idem…
Browse files Browse the repository at this point in the history
…potency keyn siivous, uusi kantamigraatio paremman idempotency key indexin luontiin
  • Loading branch information
marjakari committed Nov 13, 2024
1 parent ede9bf0 commit d52359a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ jobs:
mkdir -p ./target/static/_next
cp -R ./target/viestinvalitys-raportointi/.next/static ./target/static/_next/static
# - name: Run Flyway Migrations
# run: |
# cd cdk
# cdk deploy MigraatioStack --require-approval never -c "environment=${{ inputs.environment }}"
- name: Run Flyway Migrations
run: |
cd cdk
cdk deploy MigraatioStack --require-approval never -c "environment=${{ inputs.environment }}"
- name: Deploy Lambdas
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class LambdaHandler extends RequestHandler[Object, Void] {
})
})

//val poistetutAvaimet = kantaOperaatiot.poistaIdempotencyKeys(Instant.now().minusSeconds(60*60*48))
//LOG.info("Poistettiin idempotency-avaimet (" + poistetutAvaimet + " kpl) yli 48h sitten luoduilta viesteiltä")
val poistetutAvaimet = kantaOperaatiot.poistaIdempotencyKeys(Instant.now().minusSeconds(60*60*48))
LOG.info("Poistettiin idempotency-avaimet (" + poistetutAvaimet + " kpl) yli 48h sitten luoduilta viesteiltä")

null
})
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DROP INDEX IF EXISTS idempotenct_idx;
CREATE UNIQUE INDEX IF NOT EXISTS idempotency_idx ON viestit (omistaja, idempotency_key) WHERE idempotency_key IS NOT NULL;

0 comments on commit d52359a

Please sign in to comment.