Skip to content

Commit

Permalink
fix: misc
Browse files Browse the repository at this point in the history
  • Loading branch information
Skelmis committed Jan 4, 2024
1 parent 2b32680 commit a2a27e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ typing_extensions==4.3.0
websockets==10.4
yarl==1.7.2
zonis==1.2.5
httpx
6 changes: 3 additions & 3 deletions suggestions/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import aiohttp
import cooldowns
import disnake
import httpx
from disnake import Locale
from disnake.ext import commands
from bot_base.paginators.disnake_paginator import DisnakePaginator
Expand All @@ -27,9 +28,8 @@ async def create_bot(database_wrapper=None) -> SuggestionsBot:
is_prod: bool = True if os.environ.get("PROD", None) else False

if is_prod:
async with aiohttp.ClientSession() as session:
async with session.get("http://localhost:7878/shard-count") as resp:
total_shards = int(await resp.text())
request = httpx.get("http://localhost:7878/shard-count")
total_shards = int(request.text)
cluster_id = int(os.environ["CLUSTER"])
offset = cluster_id - 1
number_of_shards_per_cluster = 10
Expand Down

0 comments on commit a2a27e9

Please sign in to comment.