From eb2233566e4d56128dce2d39a1751ec1020522b2 Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Thu, 18 Jan 2024 18:51:01 +0330 Subject: [PATCH 1/3] feat: Skipping the INTERACTION_RESPONSE.Create! --- celery_app/tasks.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/celery_app/tasks.py b/celery_app/tasks.py index 841a02c..335bc3c 100644 --- a/celery_app/tasks.py +++ b/celery_app/tasks.py @@ -48,22 +48,22 @@ def ask_question_auto_search( interaction = json.loads(bot_given_info["content"]["interaction"]) chat_input_interaction = ChatInputCommandInteraction.from_dict(interaction) - create_interaction_content = Payload.DISCORD_BOT.INTERACTION_RESPONSE.Create( - interaction=chat_input_interaction, - data=InteractionResponse( - type=4, - data=InteractionCallbackData( - content="Processing your question ...", flags=64 - ), - ), - ).to_dict() + # create_interaction_content = Payload.DISCORD_BOT.INTERACTION_RESPONSE.Create( + # interaction=chat_input_interaction, + # data=InteractionResponse( + # type=4, + # data=InteractionCallbackData( + # content="Processing your question ...", flags=64 + # ), + # ), + # ).to_dict() - logging.info(f"{prefix}Sending process question to discord-bot!") - job_send( - event=Event.DISCORD_BOT.INTERACTION_RESPONSE.CREATE, - queue_name=Queue.DISCORD_BOT, - content=create_interaction_content, - ) + # logging.info(f"{prefix}Sending process question to discord-bot!") + # job_send( + # event=Event.DISCORD_BOT.INTERACTION_RESPONSE.CREATE, + # queue_name=Queue.DISCORD_BOT, + # content=create_interaction_content, + # ) logging.info(f"{prefix}Querying the data sources!") # for now we have just the discord platform response, source_nodes = query_multiple_source( From 4e26f91727f881dec9057049b729a220ca0c4fc9 Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Thu, 18 Jan 2024 18:56:49 +0330 Subject: [PATCH 2/3] fix: flake8 linter issues! --- celery_app/tasks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/celery_app/tasks.py b/celery_app/tasks.py index 335bc3c..72f1957 100644 --- a/celery_app/tasks.py +++ b/celery_app/tasks.py @@ -12,9 +12,9 @@ from tc_messageBroker.rabbit_mq.payload.discord_bot.chat_input_interaction import ( ChatInputCommandInteraction, ) -from tc_messageBroker.rabbit_mq.payload.discord_bot.interaction_response import ( - InteractionResponse, -) +# from tc_messageBroker.rabbit_mq.payload.discord_bot.interaction_response import ( +# InteractionResponse, +# ) from tc_messageBroker.rabbit_mq.payload.payload import Payload from tc_messageBroker.rabbit_mq.queue import Queue From 2216eca463e829799ce9ecb392f79ef97a6ab4ca Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Thu, 18 Jan 2024 19:04:25 +0330 Subject: [PATCH 3/3] fix: linter issues based on superlinter! --- celery_app/tasks.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/celery_app/tasks.py b/celery_app/tasks.py index 72f1957..95c651a 100644 --- a/celery_app/tasks.py +++ b/celery_app/tasks.py @@ -12,9 +12,6 @@ from tc_messageBroker.rabbit_mq.payload.discord_bot.chat_input_interaction import ( ChatInputCommandInteraction, ) -# from tc_messageBroker.rabbit_mq.payload.discord_bot.interaction_response import ( -# InteractionResponse, -# ) from tc_messageBroker.rabbit_mq.payload.payload import Payload from tc_messageBroker.rabbit_mq.queue import Queue