This repository has been archived on 2022-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
dataupdater/README.md

44 lines
895 B
Markdown
Raw Normal View History

# TWHelp cron
2020-06-01 19:05:33 +00:00
Features:
2021-05-01 14:26:16 +00:00
- Adds automatically new servers.
2021-05-03 14:40:13 +00:00
- Fetches and updates server data (players, tribes, ODA, ODD, ODS, OD, conquers, configs).
2020-10-10 06:49:18 +00:00
- Saves daily player/tribe stats, player/tribe history, tribe changes, player name changes, server stats.
2021-05-03 14:40:13 +00:00
- Clears database from old player/tribe stats, player/tribe history.
## Development
2021-05-06 13:06:38 +00:00
**Required ENV variables:**
2020-06-01 19:05:33 +00:00
```
DB_USER=your_db_user
DB_NAME=your_db_name
2020-06-01 19:05:33 +00:00
DB_PORT=5432
DB_HOST=your_db_host
DB_PASSWORD=your_db_pass
REDIS_ADDR=redis_addr
REDIS_DB=redis_db
REDIS_USER=redis_user
REDIS_PASSWORD=redis_password
RUN_ON_INIT=true|false
LOG_DB_QUERIES=true|false
WORKER_LIMIT=1
2020-06-01 19:05:33 +00:00
```
### Prerequisites
1. Golang
2. PostgreSQL
3. Redis
### Installing
1. Clone this repo.
2. Navigate to the directory where you have cloned this repo.
3. Set the required env variables directly in your system or create .env.local file.
4. go run main.go