почему этот код: from fastapi import APIRouter, Request, HTTPException
from fastapi.responses import JSONResponse
from uvicorn import run as uvicorn_run
import aio_pika
import asyncio
import httpx
import json
import time

from cfg import RMQ_URL, PGRST_TOKEN, PGRST_URL_PUSH_EVENT

BATCH_SIZE = 120

PGRST_HEADER = {
   "Authorization": f"Bearer {PGRST_TOKEN}",
   "Content-Type": "application/json"
}

class EventStreamSave:
    def __init__(self):
        self.router = APIRouter()
        self.initialize_routes()

    def initialize_routes(self):
        self.router.add_api_route('/status', self.status, methods=['GET'])
        self.router.add_api_route('/savestream', self.savestream, methods=['GET'])
        self.router.add_api_route('/', self.savestream, methods=['GET'])

    def run(self):
        uvicorn_run(self.router, host='0.0.0.0', port=80)

    async def status(self, request: Request):
        return JSONResponse(content={"status": "ok"})

    async def push_event(self, url, data):
        async with httpx.AsyncClient() as client:
            resp = await client.post(url=url, json=data, headers=PGRST_HEADER)
            if resp.status_code != 200:
                raise HTTPException(
                        status_code=400,
                        detail=f"Can't write event to base, answer status not {resp.status_code}: {resp.text}"
                    )
            rsp = resp.json()
        
        print('RESP TEXT^ ', resp.text)
            
        return rsp
                
    async def savestream(self):
        connection = await aio_pika.connect_robust(RMQ_URL)
        queue_name = "oracle_events_archieve"
        channel = await connection.channel()
        # Maximum message count which will be processing at the same time.
        await channel.set_qos(prefetch_count=120)
        # Declaring queue
        queue = await channel.get_queue(queue_name)
        
        unique_guids = []
        event_records = []
        iter = 1
        async with queue.iterator() as queue_iter:
            async for message in queue_iter:
                data = json.loads(message.body)
                                
                if data.get("attributes", False) and \
                    data.get("data", False) and \
                    data.get("type", False) and \
                    data.get("kind", False):
                        
                    if data["attributes"]["event_guid"] not in unique_guids and data["attributes"]["method"] != 'sync_channels':
                        unique_guids.append(data["attributes"]["event_guid"])
                        
                        channel_guid = data["attributes"]["channel"].get("guid", None) if data["attributes"]["channel"] else None
            
                        peer_id = data["attributes"]["channel"].get("peer_id", None) if data["attributes"]["channel"] else None 
                        if not peer_id:
                            peer_id = data["data"]["payload"]["cache_key"].get("peer_id", None) if data["data"].get("payload", None) else None
                        
                        if data["attributes"]["method"] == 'send_message_handle':
                            send_message = True if data["data"].get("payload", {}).get("log_message", {}).get("output", {}).get("messages_links") else False
                        else:
                            send_message = None    
                                            
                        error_list = []
                        for error in data["data"]["errors"]:
                            error_list.append({
                                "event_guid" : data["attributes"]["event_guid"], 
                                "ts": time.strftime(f"%Y-%m-%d %H:%M:%S %z", time.localtime(error["timestamp"])),
                                "msg": error["msg"],
                                "type": error["type"]
                            })
                                
                        result_list = []         
                        for result in data["data"]["results"]:
                            result_list.append({
                                "event_guid" : data["attributes"]["event_guid"], 
                                "ts": time.strftime(f"%Y-%m-%d %H:%M:%S %z", time.localtime(result["timestamp"])),
                                "value": result["value"],
                                "method": result.get("method", False)
                            })
                        
                        record = {
                            "event_record": {
                                "platform" : data["attributes"]["platform"],
                                "event_guid" : data["attributes"]["event_guid"],
                                "type" : data["attributes"].get("type", None),
                                "method" : data["attributes"]["method"],
                                "account_guid" : data["attributes"]["account"]["guid"],
                                "channel_guid" : channel_guid,
                                "channel_peer_id": peer_id,
                                "is_error" : bool(data["data"]["errors"]),
                                "payload" : data["data"].get("payload", None),
                                "event_timestamp" : time.strftime(f"%Y-%m-%d %H:%M:%S %z", time.localtime(data["attributes"]["event_timestamp"])),
                                "is_send_message_done": send_message,                
                                "decision" : data["data"]["payload"]["base_logic"] if data["data"].get("payload", None) else None,       
                                "profile" : data["data"]["payload"]["answer"]["profile"] if data["data"].get("payload", None) else None, 
                                "trigger_text" : data["data"]["payload"]["text"] if data["data"].get("payload", None) else None,  
                                "num_intents" : data["data"]["payload"]["answer"]["num_intents"] if data["data"].get("payload", None) else None, 
                                "answer_text" : data["data"]["payload"]["answer"]["clearText"] if data["data"].get("payload", None) else None  
                            },
                            "event_errors": error_list,
                            "result_records": result_list
                        }    
                        
                        event_records.append(record)
                        
                        if iter == BATCH_SIZE:
                            await self.push_event(PGRST_URL_PUSH_EVENT, {"input": event_records})
                            event_records = []
                            iter = 0
                        
                        iter += 1
                        
                await message.ack()

if __name__ == "__main__":
    obj = EventStreamSave()
    obj.run(), выводит ошибку: httpx.WriteTimeout