Skip to content

Commit d31cafd

Browse files
balogh.adam@icloud.combalogh.adam@icloud.com
authored andcommitted
no bypass
1 parent 33b7cf6 commit d31cafd

4 files changed

Lines changed: 8 additions & 9 deletions

File tree

onchain/tokens/metadata.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ def __init__(self, get_table: Callable[[], Awaitable[TableResource]]):
5353
@property
5454
async def session(self) -> aiohttp.ClientSession:
5555
if self._session is None:
56-
self._session = aiohttp.ClientSession()
56+
self._session = aiohttp.ClientSession(
57+
timeout=aiohttp.ClientTimeout(total=10), # Add timeout
58+
connector=aiohttp.TCPConnector(limit=100, limit_per_host=30) # Connection pooling
59+
)
5760
return self._session
5861

5962
@alru_cache(maxsize=100_000, ttl=60 * 60)

server/activity_tracker.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,8 @@ async def increment_message_count(
6161
if last_message_date != today:
6262
daily_message_count = 0
6363

64-
# Check if daily limit reached, except for Subnet miner wallet
65-
if (
66-
daily_message_count >= PointsConfig.DAILY_MESSAGE_LIMIT
67-
and user_address not in DAILY_LIMIT_BYPASS_WALLETS
68-
and miner_token != MINER_TOKEN
69-
):
64+
# Check if daily limit reached
65+
if daily_message_count >= PointsConfig.DAILY_MESSAGE_LIMIT:
7066
return False
7167

7268
# Update both total and daily message counts, and points

server/dynamodb_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def table_context_factory(self, table_name: str):
1818

1919

2020
class TableContext:
21-
def __init__(self, session, table_name):
21+
def __init__(self, session: aioboto3.Session, table_name):
2222
self.session = session
2323
self.table_name = table_name
2424

server/fastapi_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ async def get_activity_stats(
353353
)
354354
raise HTTPException(status_code=500, detail="Internal server error")
355355

356-
@app.post("/api/sentient/assist")
356+
# @app.post("/api/sentient/assist")
357357
async def sentient_assist(
358358
request: Request,
359359
user: FirebaseIDTokenData = Depends(get_current_user),

0 commit comments

Comments
 (0)