Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add additional error handling for Rabbitmq, improved answer parsing, remove unused dependencies, linting #42

Merged
merged 13 commits into from
Jan 15, 2024

Conversation

renehonig
Copy link
Member

Describe the background of your pull request

Add error handling for publishing responses to Rabbitmq.
Note that this does not create full robustness against Rabbitmq service failure, but should hopefully resolve an observed issue with Rabbitmq during testing.

Governance

  • Documentation is added
  • Test cases are added or updated

By submitting this pull request I confirm that:

@valentinyanakiev
Copy link
Member

I've tried on acc, still got:

01-05 12:12:56 - def_ingest - INFO - generating html: /app/data/website/source, https://www.alkemio.org
01-05 12:12:56 - def_ingest - INFO - Extracting urls using /app/data/website/generated/sitemap.xml
01-05 12:12:58 - def_ingest - INFO - ==> Returning 78 files; 0 gave errors + 126 files were skipped
01-05 12:12:59 - def_ingest - INFO - generating html: /app/data/website2/source, https://welcome.alkem.io
01-05 12:12:59 - def_ingest - INFO - Extracting urls using /app/data/website2/generated/sitemap.xml
01-05 12:13:01 - def_ingest - INFO - ==> Returning 59 files; 0 gave errors + 75 files were skipped
01-05 12:13:21 - def_ingest - INFO -
Embedding costs: 0.0
01-05 12:13:21 - main - INFO - Ingest operation completed
01-05 12:13:21 - main - ERROR - Failed to publish message due to a RabbitMQ error:
Exception in callback _task_done(<Task finishe...dStateError()>) at /root/.cache/pypoetry/virtualenvs/guidance-engine-9TtSrW0h-py3.11/lib/python3.11/site-packages/aio_pika/tools.py:43
handle: <Handle _task_done(<Task finishe...dStateError()>) at /root/.cache/pypoetry/virtualenvs/guidance-engine-9TtSrW0h-py3.11/lib/python3.11/site-packages/aio_pika/tools.py:43>
Traceback (most recent call last):
File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/root/.cache/pypoetry/virtualenvs/guidance-engine-9TtSrW0h-py3.11/lib/python3.11/site-packages/aio_pika/tools.py", line 47, in _task_done
raise exc
File "/app/guidance_engine.py", line 137, in on_request
async with message.process():
File "/root/.cache/pypoetry/virtualenvs/guidance-engine-9TtSrW0h-py3.11/lib/python3.11/site-packages/aio_pika/message.py", line 586, in aexit
await self.message.ack()
File "/root/.cache/pypoetry/virtualenvs/guidance-engine-9TtSrW0h-py3.11/lib/python3.11/site-packages/aio_pika/message.py", line 476, in ack
await self.channel.basic_ack(
^^^^^^^^^^^^
File "/root/.cache/pypoetry/virtualenvs/guidance-engine-9TtSrW0h-py3.11/lib/python3.11/site-packages/aio_pika/message.py", line 414, in channel
raise ChannelInvalidStateError
aiormq.exceptions.ChannelInvalidStateError

@renehonig renehonig changed the title add additional error handling for responses back to Rabbitmq add additional error handling for Rabbitmq, improved answer parcing, remove unused dependencies, linting Jan 5, 2024
@renehonig renehonig changed the title add additional error handling for Rabbitmq, improved answer parcing, remove unused dependencies, linting add additional error handling for Rabbitmq, improved answer parsing, remove unused dependencies, linting Jan 5, 2024
@valentinyanakiev valentinyanakiev merged commit 550ffc3 into develop Jan 15, 2024
@valentinyanakiev valentinyanakiev deleted the check-queue branch January 15, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants