Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reetou/backend_task
https://github.com/reetou/backend_task
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/reetou/backend_task
- Owner: reetou
- Created: 2024-08-08T09:11:00.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-08-08T17:47:07.000Z (5 months ago)
- Last Synced: 2024-12-04T03:08:02.138Z (about 2 months ago)
- Language: Elixir
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CarRental Task
Your task here is to code a solution for description below.
- You can add any library you want
- Don't change already exisiting code# Story
You work for car rental company, which has it's own database of clients. When your client is added for the first time to the system you calculate their trust score using external API which is valid for one month. Nevertheless, you don't want to do that each time you process rental, cause it takes a few minutes to process. You want to have you're database up to date though. That's why you want to handle this process asynchronously every week.
Write code which updates trust score every week for all clients we have in our system.
# API limitations:
- rate limit 10 requests per minute
- endpoint can process only 100 employees (you need to group them)# Exisiting interface:
You should use below functions which are interface for already exisiting part of a system:
- `CarRental.TrustScore.calculate_score/1` - funtion which returns calculated trust score for client
- `CarRental.Clients.list_clients/0` - function which returns list of clients
- `CarRental.Clients.save_score_for_client/1` - funtion which saves trust score for client