Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtsam committed Jan 11, 2025
1 parent 692a320 commit a0695f1
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/clean-db.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
name: 🧹 Clean Database

on:
schedule:
- cron: '0 0 1 * *'
push:
branches:
- dev

jobs:
refresh:
name: 🧹 Clean Database
runs-on: ubuntu-22.04
steps:
- name: 🧹 Clean Database
run: |
curl -X POST \
-H 'Authorization: Bearer ${{ secrets.STAGING_TURSO_DB_AUTH_TOKEN }}' \
-H 'Content-Type: application/json' \
-d '{ "requests": [ { "type": "execute", "stmt": { "sql": "DELETE * from session WHERE expiration_at < unixepoch()" } }, { "type": "close" } ] }' \
https://${{ secrets.TURSO_DATABASE_NAME }}-${{ secrets.TURSO_ORG_NAME}}.turso.io/v2/pipeline
run:
curl https://${{ secrets.TURSO_DATABASE_NAME }}-${{
secrets.TURSO_ORG_NAME}}.turso.io/v2/pipeline
# run: |
# curl -X POST \
# -H 'Authorization: Bearer ${{ secrets.STAGING_TURSO_DB_AUTH_TOKEN }}' \
# -H 'Content-Type: application/json' \
# -d '{ "requests": [ { "type": "execute", "stmt": { "sql": "DELETE FROM session WHERE expiration_at < unixepoch()*1000" } }, { "type": "close" } ] }' \
# https://${{ secrets.TURSO_DATABASE_NAME }}-${{ secrets.TURSO_ORG_NAME}}.turso.io/v2/pipeline

0 comments on commit a0695f1

Please sign in to comment.