Skip to content

Commit

Permalink
Merge pull request #2406 from concord-consortium/188211348-increase-a…
Browse files Browse the repository at this point in the history
…t-midnight-timeout

try to increase timeout to 30 minutes
  • Loading branch information
scytacki authored Sep 13, 2024
2 parents 36b3ee1 + 0cfe1f1 commit 2b88ec1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion functions-v2/src/at-midnight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@ import * as logger from "firebase-functions/logger";
// type errors.
import {cleanFirebaseRoots} from "../../shared/clean-firebase-roots";

export const atMidnight = onSchedule("0 7 * * *", runAtMidnight);
export const atMidnight = onSchedule(
{
// Let the function run for 30 minutes.
// From early testing it looks like the function can delete 500 qa roots
// every 5 minutes.
timeoutSeconds: 1800,
// Run the function at 7am UTC or 12am PDT
schedule: "0 7 * * *",
},
runAtMidnight
);

// This function is split out so it can be tested by Jest. The
// firebase-functions-test library doesn't support wrapping onSchedule.
Expand Down

0 comments on commit 2b88ec1

Please sign in to comment.