Skip to content

Commit 6d112ec

Browse files
committed
Load RabbitMQ credentials only when not in demo mode
1 parent 2fb92de commit 6d112ec

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/murfey/server/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,12 @@ def run():
287287
# Install a log filter to all existing handlers.
288288
LogFilter.install()
289289

290-
# Load RabbitMQ configuration
291-
PikaTransport().load_configuration_file(security_config.rabbitmq_credentials)
292-
293-
# Set up RabbitMQ connection
294290
if args.demo:
291+
# Run in demo mode with no connections set up
295292
os.environ["MURFEY_DEMO"] = "1"
296293
else:
294+
# Load RabbitMQ configuration and set up the connection
295+
PikaTransport().load_configuration_file(security_config.rabbitmq_credentials)
297296
_set_up_transport("pika")
298297

299298
# Set up logging now that the desired verbosity is known

0 commit comments

Comments
 (0)