38 lines
740 B
Markdown
38 lines
740 B
Markdown
# Lenenergo Parser
|
|
|
|
## DB columns settings
|
|
|
|
Append to `runner/config.py`
|
|
|
|
```python
|
|
DB_COLUMNS_MAP["<COL_NS key>"] = "<corresponding db column name>"
|
|
```
|
|
|
|
## Running instructions
|
|
|
|
```bash
|
|
docker build . -it lenenergo_parser
|
|
docker run -d \
|
|
[-e REFETCH_PERIOD_H=4] \ # Refetch period
|
|
[-e STORE_NULL_BID=False] \ # Store rows with null building_id
|
|
# DB auth variants
|
|
[-e POSTGRES_USER=lenenergo] \
|
|
[-e POSTGRES_PASSWORD=lenenergo] \
|
|
[-e POSTGRES_DB=lenenergo] \
|
|
[-e POSTGRES_HOST=localhost] \
|
|
[-e POSTGRES_PORT=5432] \
|
|
# or
|
|
[DB_URL=postgresql://lenenergo:lenenergo@localhost:5432/lenenergo] \
|
|
lenenergo_parser
|
|
```
|
|
|
|
## Dev instructions
|
|
|
|
```bash
|
|
python -m venv .venv
|
|
|
|
pip install -r requirements.txt
|
|
|
|
python -m runner
|
|
```
|