From 40c51ad6660f74d9287f0d62aa36bdb20a29eb83 Mon Sep 17 00:00:00 2001 From: Michalina Date: Thu, 14 Sep 2023 12:28:58 +0200 Subject: [PATCH] Run pledge sync daily We want to update the pledge sync job to run daily rather than every three days so that no new pledge signers (or old community who havent signed, but now need to) are missed. --- .github/workflows/pledge-signer-sync/pledge-sync.js | 4 ++-- .github/workflows/sync-pledge.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pledge-signer-sync/pledge-sync.js b/.github/workflows/pledge-signer-sync/pledge-sync.js index 2e70105b12..eea1cdab4a 100644 --- a/.github/workflows/pledge-signer-sync/pledge-sync.js +++ b/.github/workflows/pledge-signer-sync/pledge-sync.js @@ -22,8 +22,8 @@ if (!GALXE_ACCESS_TOKEN || !FIRESTORE_USER || !FIRESTORE_PASSWORD) { process.exit(1) } -// Limit sync range to last 4 days ( 2 days from last sync + 2 days from now ) -const TARGET_DATE = new Date(Date.now() - 4 * 24 * 60 * 60_000) +// Limit sync range to last 2 days (1 day from the last sync + 1 day margin) +const TARGET_DATE = new Date(Date.now() - 2 * 24 * 60 * 60_000) const wait = (ms) => new Promise((r) => { diff --git a/.github/workflows/sync-pledge.yml b/.github/workflows/sync-pledge.yml index 7aa175377d..622a4189a6 100644 --- a/.github/workflows/sync-pledge.yml +++ b/.github/workflows/sync-pledge.yml @@ -2,7 +2,7 @@ name: Sync pledge on: schedule: - - cron: "0 0 */3 * *" + - cron: "0 0 * * *" workflow_dispatch: jobs: