rage, part2 (hotfix from prod)

This commit is contained in:
Romain J 2021-04-25 01:22:39 +02:00
parent 96cfa17d2e
commit 56e45b52b5

View file

@ -6,7 +6,7 @@ from typing import Optional
import aiohttp import aiohttp
import discord import discord
from aiohttp import ClientConnectorError, InvalidURL from aiohttp import ClientConnectorError, InvalidURL, TCPConnector
from jishaku.models import copy_context_with from jishaku.models import copy_context_with
from discord.ext import commands, tasks from discord.ext import commands, tasks
from ipinfo.exceptions import RequestQuotaExceededError from ipinfo.exceptions import RequestQuotaExceededError
@ -93,9 +93,9 @@ class Network(commands.Cog):
@tasks.loop(hours=1.0) @tasks.loop(hours=1.0)
async def _update_peering_db(self): async def _update_peering_db(self):
try: try:
async with aiohttp.ClientSession() as cs: async with aiohttp.ClientSession(connector=TCPConnector(verify_ssl=False)) as cs:
async with cs.get( async with cs.get(
"https://peeringdb.com/api/net", "https://3.233.208.117/api/net",
timeout=aiohttp.ClientTimeout(total=60), timeout=aiohttp.ClientTimeout(total=60),
) as s: ) as s:
self._peeringdb_net = await s.json() self._peeringdb_net = await s.json()