2020-06-01 19:05:33 +00:00
|
|
|
# tribalwarshelp.com cron
|
|
|
|
|
2020-08-24 10:38:52 +00:00
|
|
|
Features:
|
|
|
|
|
2020-08-25 00:19:12 +00:00
|
|
|
- Add automatically new TribalWars servers.
|
|
|
|
- Fetch TribalWars servers data (players, tribes, ODA, ODD, ODS, OD, conquers, configs).
|
|
|
|
- Save daily player/tribe stats, player/tribe history, tribe changes, player name changes, server stats.
|
|
|
|
- Vacuum the database daily from old player/tribe stats, player/tribe history.
|
2020-08-24 10:38:52 +00:00
|
|
|
|
|
|
|
## Development
|
|
|
|
|
2020-08-24 12:06:32 +00:00
|
|
|
**Required env variables to run this cron** (you can set them directly in your system or create .env.development file):
|
2020-06-01 19:05:33 +00:00
|
|
|
|
|
|
|
```
|
2020-08-24 10:38:52 +00:00
|
|
|
DB_USER=your_db_user
|
|
|
|
DB_NAME=your_db_name
|
2020-06-01 19:05:33 +00:00
|
|
|
DB_PORT=5432
|
2020-08-24 10:38:52 +00:00
|
|
|
DB_HOST=your_db_host
|
|
|
|
DB_PASSWORD=your_db_pass
|
2020-06-01 19:05:33 +00:00
|
|
|
```
|
2020-08-24 10:38:52 +00:00
|
|
|
|
|
|
|
### Prerequisites
|
|
|
|
|
|
|
|
1. Golang
|
|
|
|
2. PostgreSQL database
|
|
|
|
|
|
|
|
### Installing
|
|
|
|
|
|
|
|
1. Clone this repo.
|
|
|
|
2. Navigate to the directory where you have cloned this repo.
|
2020-08-24 12:06:32 +00:00
|
|
|
3. Set the required env variables directly in your system or create .env.development file.
|
2020-08-24 10:38:52 +00:00
|
|
|
4. go run main.go
|