Skip to content

Commit b6b5ee0

Browse files
authored
Merge pull request #15 from ozgurkara/depends-updates
Depends updated (fastapi, uvicorn, redis)
2 parents 6f1a6e2 + f0e4ad9 commit b6b5ee0

File tree

6 files changed

+14
-33
lines changed

6 files changed

+14
-33
lines changed

.env

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
#JaegerHost=jaeger
2-
#JaegerPort=5775
3-
#JaegerSamplerType=probabilistic
4-
#JaegerSamplerRate=1.0
5-
#JaegerServiceName=fastapi-pydaitor
6-
#JaegerTraceIdHeader=x-trace-id
7-
#RedisHost=redis
8-
#RedisPort=6379
9-
#RedisDb=0
10-
#TracerIsActive=false
1+
#REDIS_HOST=redis
2+
#REDIS_PORT=6379
3+
#REDIS_DB=0
4+
#REDIS_DB=REDIS_KEY_PREFIX

app/application.py

-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ def create_app():
3939
tags=["todo"]
4040
)
4141

42-
@app.on_event('startup')
43-
async def startup():
44-
app.add_middleware(StateRequestIDMiddleware)
45-
4642
set_up_pydiator()
4743

4844
return app

app/utils/config.py

+1-8
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,5 @@
1313
DISTRIBUTED_CACHE_IS_ENABLED = config("DISTRIBUTED_CACHE_IS_ENABLED", bool, True)
1414
CACHE_PIPELINE_IS_ENABLED = config("CACHE_PIPELINE_IS_ENABLED", bool, False)
1515
LOG_PIPELINE_IS_ENABLED = config("LOG_PIPELINE_IS_ENABLED", bool, True)
16-
TRACER_PIPELINE_IS_ENABLED = config("TRACER_PIPELINE_IS_ENABLED", bool, True)
17-
TRACER_IS_ENABLED = config('TRACER_IS_ENABLED', bool, True)
1816

19-
JAEGER_HOST = config('JAEGER_HOST', str, '0.0.0.0')
20-
JAEGER_PORT = config('JAEGER_PORT', int, 5775)
21-
JAEGER_SAMPLER_TYPE = config('JAEGER_SAMPLER_TYPE', str, 'probabilistic')
22-
JAEGER_SAMPLER_RATE = config('JAEGER_SAMPLER_RATE', float, 1.0)
23-
JAEGER_TRACE_ID_HEADER = config('JAEGER_TRACE_ID_HEADER', str, 'x-trace-id')
24-
JAEGER_SERVICE_NAME = config('JAEGER_SERVICE_NAME', str, 'fastapi_pydiator')
17+

app/utils/pydiator/pydiator_core_config.py

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def set_up_pydiator():
3434
container.register_pipeline(cache_pipeline)
3535

3636
# Service usecases mapping
37-
# container.register_request(GetSampleByIdRequest, GetSampleByIdUseCase())
3837
container.register_request(GetTodoAllRequest, GetTodoAllUseCase())
3938
container.register_request(GetTodoByIdRequest, GetTodoByIdUseCase())
4039
container.register_request(AddTodoRequest, AddTodoUseCase())

requirements.txt

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
uvicorn==0.13.3
2-
fastapi==0.65.2
3-
fastapi-contrib==0.2.9
1+
uvicorn==0.27.0.post1
2+
fastapi==0.109.0
3+
fastapi-contrib==0.2.11
44
pydiator-core==1.0.12
5-
pydantic==1.7.4
6-
redis==3.5.3
5+
pydantic==1.10.14
6+
redis==5.0.1
77

88
# test
99
pytest==8.0.0
1010
requests==2.31.0
1111
coverage==7.4.1
1212
pytest-env==1.1.3
1313
python-dotenv==1.0.1
14-
15-
16-
17-
18-
14+
httpx==0.26.0

tests/.env

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#RedisHost=redis
2+
#RedisPort=6379
3+
#RedisDb=0

0 commit comments

Comments
 (0)