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.
Go to file
2021-05-03 16:40:13 +02:00
.circleci update docker repository in .circleci/config.yml 2021-02-06 12:39:26 +01:00
internal rename one of the packages - db -> postgres 2021-05-03 16:35:24 +02:00
.gitignore bump github.com/tribalwarshelp/shared, update .gitignore and logrus setup 2021-04-23 21:20:01 +02:00
Dockerfile update Dockerfile (rename the env "MODE", rename output file) 2021-05-03 16:38:03 +02:00
go.mod correct imports 2021-05-03 16:33:12 +02:00
go.sum correct imports 2021-05-03 16:33:12 +02:00
LICENSE add LICENSE, update DOCKERFILE 2020-11-18 12:53:32 +01:00
main.go rename one of the packages - db -> postgres 2021-05-03 16:35:24 +02:00
README.md update README.md 2021-05-03 16:40:13 +02:00

TWHelp cron

Features:

  • Adds automatically new servers.
  • Fetches and updates server data (players, tribes, ODA, ODD, ODS, OD, conquers, configs).
  • Saves daily player/tribe stats, player/tribe history, tribe changes, player name changes, server stats.
  • Clears database from old player/tribe stats, player/tribe history.

Development

Required env variables:

DB_USER=your_db_user
DB_NAME=your_db_name
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

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