From 6bfed664d6e29c632be2710c782fe236c703c1bb Mon Sep 17 00:00:00 2001 From: Enzo Nunes Date: Thu, 27 Feb 2025 11:02:19 +0000 Subject: [PATCH 1/2] extend timeout to 10min --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index ffb94de..bd505d2 100644 --- a/main.py +++ b/main.py @@ -52,7 +52,7 @@ async def picable(interaction: Interaction, owner: str, repository: str): try: result_future = create_task(to_thread(PICable, owner, repository, github_token)) try: - result = await wait_for(shield(result_future), timeout=5) + result = await wait_for(shield(result_future), timeout=600) await interaction.followup.send(result) except TimeoutError: await interaction.followup.send( From 46db758bd2ef3448801965267594908242cf5b7c Mon Sep 17 00:00:00 2001 From: Enzo Nunes Date: Thu, 27 Feb 2025 11:19:26 +0000 Subject: [PATCH 2/2] add mention on message after timeout --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index bd505d2..d2e08af 100644 --- a/main.py +++ b/main.py @@ -59,7 +59,7 @@ async def picable(interaction: Interaction, owner: str, repository: str): f"The analysis for {repository_full_name} is still taking place. The results will be posted here once the analysis is complete. :clock4:" ) result = await result_future - await interaction.channel.send(result) + await interaction.channel.send(f"{interaction.user.mention}\n{result}") except Exception as e: print(f"Error processing PICable check: {e}") await interaction.channel.send("An error occurred while processing your request. Please try again later.")