Getting this to work with FastAPI or another Async Backend
オープン
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 49
- フォーク
- 36
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
When attempting to do this in my FastAPI backend. I am noticing that the request is getting blocked.
handler = LogDNAHandler(key='')
logging.getLogger().addHandler(handler)
logging.info("Checking to see if it works!")
Looking at the library. I included the print "Request Sent". It never gets printed, the request does not execute, the backend sits there and I need to restart the entire app.
try:
headers = {
'user-agent': self.user_agent,
'apikey': self.key
}
response = requests.post(url=self.url,
json=data,
params={
'hostname': self.hostname,
'ip': self.ip,
'mac': self.mac,
'tags': self.tags,
'now': int(time.time() * 1000)
},
stream=True,
allow_redirects=True,
timeout=self.request_timeout,
headers=headers)
print("Request Sent")
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、issue に示されている FastAPI のセットアップを再現し、requests.post 周辺の LogDNAHandler のパスを調査します。実行がどこでブロックするかを確認し、非同期バックエンドからのロギングに期待される動作を明らかにします。バックエンドをハングさせずにリクエストが完了し、ハンドラーのリクエストパスを観測できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- fastapi, python
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100