Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
leordev committed Aug 28, 2024
1 parent d3ecefb commit b1ac406
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions metrics-collector/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ import { getYesterdayDate } from "./utils";

const isLocalPersistence = process.env.PERSIST_LOCAL_FILES === "true";

const TIMEOUT = 30 * 60 * 1000;
setTimeout(() => {
console.error("Execution timed out after", TIMEOUT / 60000, "minutes");
process.exit(1);
}, TIMEOUT);

interface Arguments {
"collect-gh": boolean;
"collect-npm": boolean;
Expand Down Expand Up @@ -99,6 +105,9 @@ async function main() {
await saveSonatypeMetrics();
await collectGhMetrics(true);
}

console.log("Data collection completed successfully");
process.exit(0);
}

async function initialLoad(
Expand Down

0 comments on commit b1ac406

Please sign in to comment.