Skip to content

Commit 92ce2c9

Browse files
authored
Merge pull request #1065 from snyk/feat/initial_sysdig_scrape
[RUN-2210] Scrape for runtime data after 20 mins
2 parents 09fbd1b + 0314120 commit 92ce2c9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ async function setupSysdigIntegration(): Promise<void> {
7373
return;
7474
}
7575

76+
const initialInterval: number = 20 * 60 * 1000; // 20 mins in milliseconds
77+
setTimeout(async () => {
78+
try {
79+
await scrapeData();
80+
} catch (error) {
81+
logger.error(
82+
{ error },
83+
'an error occurred while scraping initial runtime data',
84+
);
85+
}
86+
}, initialInterval).unref();
87+
7688
const interval: number = 4 * 60 * 60 * 1000; // 4 hours in milliseconds
7789
setInterval(async () => {
7890
try {

0 commit comments

Comments
 (0)