Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion agents/broski-bot/cogs/status_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- 4 spaces indent
"""

import asyncio
import discord
from discord.ext import commands
import subprocess
Expand All @@ -36,7 +37,10 @@ async def status(self, ctx):
)

try:
result = subprocess.run(
# subprocess.run blocks for up to 10s. On discord.py's loop that
# stalls the gateway heartbeat and every other command with it.
result = await asyncio.to_thread(
subprocess.run,
[
"docker", "ps",
"--format",
Expand Down
Loading