Skip to content

Commit 701875a

Browse files
committed
🐛 Increase timeout of delete request and use env var for base url
1 parent 5d38be1 commit 701875a

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/house-keeping.yml

+13-5
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,28 @@ on:
33
workflow_dispatch:
44
schedule:
55
- cron: "0 6 * * *" # Every day at 6:00am UTC
6-
env:
7-
API_SECRET: ${{ secrets.API_SECRET }}
86
jobs:
97
clean:
108
name: "Clean"
119
runs-on: ubuntu-latest
10+
env:
11+
API_SECRET: ${{ secrets.API_SECRET }}
1212
steps:
13+
- name: Check required variables
14+
run: |
15+
if [ -z "${{ vars.APP_BASE_URL }}" ]; then
16+
echo "Error: APP_BASE_URL is not set. Please set this variable in your GitHub repository settings."
17+
exit 1
18+
fi
19+
echo "BASE_URL=${{ vars.APP_BASE_URL }}" >> $GITHUB_ENV
1320
- name: Mark inactive polls as deleted
1421
run: |
15-
curl -X "POST" --fail "https://app.rallly.co/api/house-keeping/delete-inactive-polls" \
22+
curl -X "POST" --fail "${BASE_URL}/api/house-keeping/delete-inactive-polls" \
1623
-H "Authorization: Bearer ${API_SECRET}" \
24+
--max-time 300
1725
- name: Remove deleted polls
1826
run: |
19-
curl -X "POST" --fail "https://app.rallly.co/api/house-keeping/remove-deleted-polls" \
27+
curl -X "POST" --fail "${BASE_URL}/api/house-keeping/remove-deleted-polls" \
2028
-H "Content-Type: application/json" \
2129
-H "Authorization: Bearer ${API_SECRET}" \
22-
-d '{"take": 1000}'
30+
--max-time 300

0 commit comments

Comments
 (0)