File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ services:
13
13
volumes :
14
14
- ' .:/app'
15
15
depends_on :
16
- - dramatiq-worker
17
16
- otel-collector
18
17
command :
19
18
- opentelemetry-instrument
@@ -34,7 +33,6 @@ services:
34
33
context : .
35
34
target : http_app
36
35
depends_on :
37
- - dramatiq-worker
38
36
- otel-collector
39
37
env_file : local.env
40
38
environment :
Original file line number Diff line number Diff line change
1
+ ENVIRONMENT : " local"
1
2
AUTH__JWKS_URL : " http://oathkeeper:4456/.well-known/jwks.json"
2
- DRAMATIQ__REDIS_URL : " redis://redis:6379/0"
3
+ # DRAMATIQ__REDIS_URL: "redis://redis:6379/0"
3
4
OTEL_EXPORTER_OTLP_ENDPOINT : " http://otel-collector:4317"
Original file line number Diff line number Diff line change @@ -37,8 +37,11 @@ def init_dramatiq(config: AppConfig):
37
37
else :
38
38
broker = StubBroker ()
39
39
# broker.emit_after("process_boot")
40
- if config .ENVIRONMENT != "test" :
41
- logging .critical ("Running a non-test environment without Redis URL set" )
40
+ if config .ENVIRONMENT not in ["test" , "local" ]:
41
+ logging .critical (
42
+ "Running a non-test/non-local environment without Redis URL set" ,
43
+ extra = {"ENVIRONMENT" : config .ENVIRONMENT },
44
+ )
42
45
broker .add_middleware (AsyncIO ())
43
46
set_broker (broker )
44
47
set_encoder (ORJSONEncoder ())
Original file line number Diff line number Diff line change @@ -70,4 +70,6 @@ def test_init_dramatiq_without_redis_url(caplog):
70
70
with caplog .at_level (logging .CRITICAL ):
71
71
init_dramatiq (config )
72
72
73
- assert "Running a non-test environment without Redis URL set" in caplog .text
73
+ assert (
74
+ "Running a non-test/non-local environment without Redis URL set" in caplog .text
75
+ )
You can’t perform that action at this time.
0 commit comments