This commit is contained in:
parent
6547cea970
commit
1b94353850
|
@ -20,11 +20,12 @@ async def get_all_authors():
|
|||
async with AsyncClient() as client:
|
||||
try:
|
||||
response = await client.post(API_BASE, headers=headers, json=gql)
|
||||
print(f"[services.core] {query_name}: [{response.status_code}] {len(response.text)} bytes")
|
||||
except Exception:
|
||||
import traceback
|
||||
|
||||
traceback.print_exc()
|
||||
print(f"[services.core] {query_name}: [{response.status_code}] {len(response.text)} bytes")
|
||||
|
||||
if response.status_code != 200:
|
||||
return None
|
||||
r = response.json()
|
||||
|
@ -45,12 +46,13 @@ async def get_my_followings():
|
|||
}
|
||||
async with AsyncClient() as client:
|
||||
try:
|
||||
response = await client.post(API_BASE, headers=headers, json=gql)
|
||||
response = await client.post(API_BASE, headers=headers, json=gql)
|
||||
print(f"[services.core] {query_name}: [{response.status_code}] {len(response.text)} bytes")
|
||||
except Exception:
|
||||
import traceback
|
||||
|
||||
traceback.print_exc()
|
||||
print(f"[services.core] {query_name}: [{response.status_code}] {len(response.text)} bytes")
|
||||
|
||||
if response.status_code != 200:
|
||||
return None
|
||||
r = response.json()
|
||||
|
|
Loading…
Reference in New Issue
Block a user