Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 1.07 KB

README.md

File metadata and controls

55 lines (36 loc) · 1.07 KB

🐺 Durov

A test task from Hipasus LTD

A core logic is located here

To address the issue of multiple concurrent requests to the /users/{username} endpoint, we implemented a solution using a dictionary of Future objects. This approach ensures that when multiple requests are made for the same user, they all share the result of a single database query, rather than issuing separate queries.

Installation guide

Make sure you have docker installed

Clone repository

git clone https://github.com/ilyas-kalandar/Durov
cd Durov

Create .env file

touch .env

Example of .env file

DB_URL = "mysql+aiomysql://root:password@db/durov"

LOGGING_LVL = "INFO"
LOGGING_FORMAT = "[%(asctime)s] - |%(levelname)s| - %(message)s"

SERVING_HOST = "0.0.0.0"
SERVING_PORT = 8000

🚀 Starting project

docker-compose up --build db web 

🧪 Running tests

docker-compose up --build tests

Docs

Available at /docs

img.png