diff options
| author | 2020-05-13 20:02:25 +0300 | |
|---|---|---|
| committer | 2020-05-13 20:02:25 +0300 | |
| commit | 04cdb55fabfc21fc548754ed10aafec845ffe8db (patch) | |
| tree | fcbc7b9d76c9bc21b2dc73b8c6ee532b3d4749ff | |
| parent | PEP Improvisations: Replaced `wait_until_guild_available` with `wait_until_re... (diff) | |
PEP Improvisations: Added logging to PEP URLs fetching task
| -rw-r--r-- | bot/cogs/utils.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/cogs/utils.py b/bot/cogs/utils.py index 91f462c42..b72ba8d5a 100644 --- a/bot/cogs/utils.py +++ b/bot/cogs/utils.py @@ -242,14 +242,17 @@ class Utils(Cog): """Refresh PEP URLs listing in every 3 hours.""" # Wait until HTTP client is available await self.bot.wait_until_ready() + log.trace("Started refreshing PEP URLs.") async with self.bot.http_session.get(self.peps_listing_api_url) as resp: listing = await resp.json() + log.trace("Got PEP URLs listing from GitHub API") for file in listing: name = file["name"] if name.startswith("pep-") and (name.endswith(".txt") or name.endswith(".rst")): self.peps[int(name.split(".")[0].split("-")[1])] = file["download_url"] + log.info("Successfully refreshed PEP URLs listing.") @command(name='pep', aliases=('get_pep', 'p')) async def pep_command(self, ctx: Context, pep_number: int) -> None: |