Skip to content

Commit 1895fec

Browse files
committed
chore: addded env variable support
1 parent dac57c9 commit 1895fec

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/index.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -677,14 +677,16 @@ const client = new FirecrawlApp({
677677
// Configuration for retries and monitoring
678678
const CONFIG = {
679679
retry: {
680-
maxAttempts: 3,
681-
initialDelay: 1000,
682-
maxDelay: 10000,
683-
backoffFactor: 2,
680+
maxAttempts: Number(process.env.FIRE_CRAWL_RETRY_MAX_ATTEMPTS) || 3,
681+
initialDelay: Number(process.env.FIRE_CRAWL_RETRY_INITIAL_DELAY) || 1000,
682+
maxDelay: Number(process.env.FIRE_CRAWL_RETRY_MAX_DELAY) || 10000,
683+
backoffFactor: Number(process.env.FIRE_CRAWL_RETRY_BACKOFF_FACTOR) || 2,
684684
},
685685
credit: {
686-
warningThreshold: 1000,
687-
criticalThreshold: 100,
686+
warningThreshold:
687+
Number(process.env.FIRE_CRAWL_CREDIT_WARNING_THRESHOLD) || 1000,
688+
criticalThreshold:
689+
Number(process.env.FIRE_CRAWL_CREDIT_CRITICAL_THRESHOLD) || 100,
688690
},
689691
};
690692

0 commit comments

Comments
 (0)