Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
danila committed Feb 3, 2024
2 parents 436916c + c186b1c commit 1c78d93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/application/broker_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from faststream.rabbit import RabbitBroker


def get_broker(broker: RabbitBroker):
def get_lifespan(broker: RabbitBroker):
@asynccontextmanager
async def lifespan(app: FastAPI):
await broker.start()
Expand Down
4 changes: 2 additions & 2 deletions src/application/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
)
from src.application.api.exception_handler import setup_exception_handlers
from src.application.api.swagger import init_swagger_endpoints
from src.application.broker_init import get_broker
from src.application.broker_init import get_lifespan
from src.application.config import Settings
from src.application.di.di_builder import build_di
from src.application.metrics_init import init_metrics
Expand Down Expand Up @@ -59,7 +59,7 @@ async def main() -> None:
"""Main entry point."""
config = load_config(config_type_model=Settings)
broker = RabbitBroker(**config.broker.model_dump(), logger=logger) # type: ignore
lifespan = get_broker(broker=broker)
lifespan = get_lifespan(broker=broker)
configure_logger(logger_config=config.logging)
app = init_app(app_config=config.app, lifespan=lifespan)
build_di(app=app, config=config, broker=broker)
Expand Down

0 comments on commit 1c78d93

Please sign in to comment.