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
Dawid Wysokiński aa1b6b0eea
Merge pull request #47 from tribalwarshelp/renovate/github.com-go-redis-redis-v8-8.x
fix(deps): update module github.com/go-redis/redis/v8 to v8.11.5
2022-03-17 20:52:52 +01:00
.github/workflows replace circleci with github workflows 2021-11-14 09:47:47 +01:00
build chore(deps): update dependency golang to v1.17.8 2022-03-04 01:51:49 +00:00
cmd replace circleci with github workflows 2021-11-14 09:47:47 +01:00
cron delete the pkg directory 2021-07-16 17:49:01 +02:00
postgres delete the pkg directory 2021-07-16 17:49:01 +02:00
queue bump github.com/tribalwarshelp/shared 2021-07-17 10:49:54 +02:00
.dockerignore update README.md, add dockerfiles 2021-07-11 11:04:51 +02:00
.gitignore bump github.com/tribalwarshelp/shared, update .gitignore and logrus setup 2021-04-23 21:20:01 +02:00
LICENSE add LICENSE, update DOCKERFILE 2020-11-18 12:53:32 +01:00
README.md chore: update the package name (github.com/tribalwarshelp/cron -> github.com/tribalwarshelp/dataupdater) 2021-07-11 11:37:39 +02:00
go.mod fix(deps): update module github.com/go-redis/redis/v8 to v8.11.5 2022-03-17 16:48:56 +00:00
go.sum fix(deps): update module github.com/go-redis/redis/v8 to v8.11.5 2022-03-17 16:48:56 +00:00
renovate.json update renovate.json 2021-07-04 17:59:34 +02:00

README.md

dataupdater

  • Adds new servers automatically.
  • 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

Prerequisites

  1. Golang
  2. PostgreSQL
  3. Redis

Installation

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
  1. Clone this repo.
git clone git@github.com:tribalwarshelp/cron.git
  1. Open the folder with this project in a terminal.
  2. Set the required env variables directly in your system or create .env.local file.
  3. Run the cron.
go run ./cmd/cron/main.go
  1. Run the data updater in a new tab.
go run ./cmd/dataupdater/main.go

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Dawid Wysokiński - contact@dwysokinski.me