mirror of
https://github.com/philip306/countapi.git
synced 2024-06-15 10:55:23 +03:00
reorg config and tests
This commit is contained in:
parent
b0c3eadf77
commit
cd2327aef7
@ -1,11 +0,0 @@
|
||||
from pydantic import BaseSettings
|
||||
|
||||
class Settings(BaseSettings):
|
||||
app_name: str = "CountAPI"
|
||||
ttlsetting: int = 100000
|
||||
redishost: str = '192.168.25.12'
|
||||
port: int = 6379
|
||||
db: int = 0
|
||||
redispass: str = ""
|
||||
|
||||
settings = Settings()
|
@ -2,7 +2,7 @@ from fastapi import FastAPI, HTTPException
|
||||
import redis
|
||||
import uuid
|
||||
|
||||
from config import settings
|
||||
from conf.config import settings
|
||||
|
||||
pool = redis.ConnectionPool(host=settings.redishost, port=settings.port, db=settings.db)
|
||||
r = redis.Redis(connection_pool=pool)
|
||||
|
0
app/tests/__init__.py
Normal file
0
app/tests/__init__.py
Normal file
Loading…
Reference in New Issue
Block a user