Skip to content

Commit

Permalink
Merge branch 'master' into 187809206-add-tolerance-statements
Browse files Browse the repository at this point in the history
  • Loading branch information
nstclair-cc authored Sep 16, 2024
2 parents d628f5e + 2b88ec1 commit f02af94
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 f02af94

Please sign in to comment.