Skip to content

A worker service for periodically download, parse and write to a database.

License

Notifications You must be signed in to change notification settings

eugercek/Currency-Worker

Repository files navigation

What is this?

An internship project.

Exchange rates are downloaded, parsed and saved in database with this program.

Afterwards a REST server reads and serves the databse.

At the last step a frontend shows data.

How to run

One Time

Change services.volumes in docker-compose.yml

docker-compose up --abort-on-container-exit

Inspect database

To look at the content of the database don't abort-on-container-exit and use psq or pgAdmin.

  • port : 54321
  • username : postgres
  • password : pass

With systemd

Change Service[]s docker-compose.yml position. in curdow-docker.service

Run docker-setup.sh

./docker-setup.sh

There are also non-docker way to install but they're abandoned!

TODOs

  • ./src/Data/Model/Currency.cs TODO This file is ugly, find a way
  • ./src/Data/Model/Currency.cs TODO Remove Primary key
  • ./src/Worker.cs TODO Decide should keep all files?
  • ./src/Worker.cs TODO Use HTTP Client instead of Old WebClient
  • ./src/Worker.cs TODO Use IFetchData IoC
  • ./src/Worker.cs TODO Directly inilne file
  • ./src/Worker.cs TODO Seperate business logic