adjustable concurrency
This commit is contained in:
@@ -8,12 +8,13 @@ dotenv.config();
|
||||
|
||||
const env = new Env();
|
||||
const POLYGON_API_KEY = env.require("POLYGON_API_KEY");
|
||||
const CONCURRENCY = Number.parseInt(env.get("CONCURRENCY", "6"));
|
||||
|
||||
const polygon = restClient(POLYGON_API_KEY, "https://api.polygon.io", {
|
||||
pagination: true,
|
||||
});
|
||||
|
||||
const queue = new PQueue({ concurrency: 6 });
|
||||
const queue = new PQueue({ concurrency: CONCURRENCY });
|
||||
|
||||
function* dateRange(
|
||||
startDateStr: string,
|
||||
|
||||
Reference in New Issue
Block a user