Skip to content

Commit 5da16be

Browse files
committed
refactor(workflow): update daily balance snapshot orchestration
- Replaced the balance snapshots script with a new batch snapshot orchestrator for improved efficiency. - Increased batch size from 3 to 10 and reduced delay between batches from 15 to 5 seconds. - Updated failure notification to use a dedicated Discord webhook for better error tracking. - Removed deprecated balance snapshots script and related API endpoints to streamline the codebase.
1 parent 148e431 commit 5da16be

File tree

10 files changed

+807
-564
lines changed

10 files changed

+807
-564
lines changed

.github/workflows/daily-balance-snapshots.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,20 @@ jobs:
2727
- name: Install dependencies
2828
run: npm ci
2929

30-
- name: Run balance snapshots
31-
run: node scripts/balance-snapshots.js
30+
- name: Run batch snapshot orchestration
31+
run: node scripts/batch-snapshot-orchestrator.js
3232
env:
3333
API_BASE_URL: "https://multisig.meshjs.dev"
3434
SNAPSHOT_AUTH_TOKEN: ${{ secrets.SNAPSHOT_AUTH_TOKEN }}
35-
BATCH_SIZE: 3
36-
DELAY_BETWEEN_REQUESTS: 3
37-
DELAY_BETWEEN_BATCHES: 15
35+
BATCH_SIZE: 10
36+
DELAY_BETWEEN_BATCHES: 5
3837
MAX_RETRIES: 3
39-
REQUEST_TIMEOUT: 30
4038

4139
- name: Notify on failure
4240
if: failure()
41+
# Send failure notification
4342
run: |
4443
echo "❌ Daily balance snapshot job failed"
45-
# Optional: Send failure notification
46-
# curl -X POST -H 'Content-type: application/json' \
47-
# --data "{\"text\":\"❌ Daily balance snapshots failed. Check the GitHub Actions logs.\"}" \
48-
# ${{ secrets.DISCORD_WEBHOOK_URL }}
44+
curl -X POST -H 'Content-type: application/json' \
45+
--data "{\"text\":\"❌ Daily balance snapshots failed. Check the GitHub Actions logs.\"}" \
46+
${{ secrets.SNAPSHOT_ERROR_DISCORD_WEBHOOK_URL }}

scripts/balance-snapshots.js

Lines changed: 0 additions & 272 deletions
This file was deleted.

0 commit comments

Comments
 (0)