Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
662 B
0
Indexable
Never
    @app.middleware("http")
    async def create_bundle_message(request: Request, call_next):
        response = await call_next(request)
        print('мидлваре в работе!!!')
        print('мидлваре в работе!!!')
        print('мидлваре в работе!!!')
        print('мидлваре в работе!!!')
        if len(settings.LIST_OBJECTS_MESSAGE_HISTORY) >=20:
            session = get_session()
            history_message_service = await get_history_service(session)
            await history_message_service.create_bulk_history_message(settings.LIST_OBJECTS_MESSAGE_HISTORY)
        return response