-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use api instead of crawling bt website
Signed-off-by: Manuel Ruck <[email protected]>
- Loading branch information
Manuel Ruck
committed
Apr 7, 2024
1 parent
df12f75
commit 325fde1
Showing
3 changed files
with
95 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const { | ||
DB_URL = 'mongodb://localhost:27017/bundestagio', | ||
IMPORT_PROCEDURES_START_CURSOR = '*', | ||
IMPORT_PROCEDURES_FILTER_BEFORE = new Date().toISOString().slice(0, 10), | ||
IMPORT_PROCEDURES_FILTER_AFTER = new Date(Number(new Date()) - 1000 * 60 * 60 * 24 * 7 * 4) | ||
.toISOString() | ||
.slice(0, 10), | ||
} = process.env; | ||
|
||
let { IMPORT_PROCEDURES_CHUNK_SIZE = 100, IMPORT_PROCEDURES_CHUNK_ROUNDS = 5 } = process.env; | ||
|
||
IMPORT_PROCEDURES_CHUNK_SIZE = Number(IMPORT_PROCEDURES_CHUNK_SIZE); | ||
IMPORT_PROCEDURES_CHUNK_ROUNDS = Number(IMPORT_PROCEDURES_CHUNK_ROUNDS); | ||
const IMPORT_PROCEDURES_FILTER_TYPES = process.env.IMPORT_PROCEDURES_FILTER_TYPES | ||
? process.env.IMPORT_PROCEDURES_FILTER_TYPES.split(',') | ||
: undefined; | ||
|
||
export const CONFIG = { | ||
DIP_API_KEY: process.env.DIP_API_KEY || '', | ||
DB_URL, | ||
IMPORT_PROCEDURES_CHUNK_SIZE, | ||
IMPORT_PROCEDURES_CHUNK_ROUNDS, | ||
IMPORT_PROCEDURES_FILTER_BEFORE, | ||
IMPORT_PROCEDURES_FILTER_AFTER, | ||
IMPORT_PROCEDURES_FILTER_TYPES, | ||
IMPORT_PROCEDURES_START_CURSOR, | ||
} as const; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters