mirror of
https://github.com/run-llama/llama_deploy.git
synced 2026-08-24 21:01:26 -04:00
[PR #413] [MERGED] refact: Simple message queue refactoring #448
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/run-llama/llama_deploy/pull/413
Author: @masci
Created: 12/20/2024
Status: ✅ Merged
Merged: 12/20/2024
Merged by: @masci
Base:
main← Head:massi/simple-msg-queue📝 Commits (10+)
6456be2cosmeticsf33cf86remove internal port conceptdf82ffbderive from AbstractMessageQueue41b0206first drafta49e2dcrewrite unit tests483e614fix testsdf1fb27skip tool tests680af0afix e2e testsb330aacfix linter94d9de7exclude untested code from coverage📊 Changes
36 files changed (+591 additions, -962 deletions)
View changed files
📝
.pre-commit-config.yaml(+1 -1)📝
e2e_tests/message_queues/message_queue_simple/test_message_queue.py(+2 -2)📝
llama_deploy/__init__.py(+5 -2)📝
llama_deploy/apiserver/deployment.py(+8 -7)📝
llama_deploy/deploy/deploy.py(+4 -7)📝
llama_deploy/message_consumers/base.py(+5 -3)📝
llama_deploy/message_consumers/remote.py(+2 -1)📝
llama_deploy/message_queues/__init__.py(+5 -3)📝
llama_deploy/message_queues/base.py(+25 -42)📝
llama_deploy/message_queues/simple/__init__.py(+4 -4)📝
llama_deploy/message_queues/simple/client.py(+57 -85)📝
llama_deploy/message_queues/simple/config.py(+12 -4)📝
llama_deploy/message_queues/simple/server.py(+55 -269)📝
llama_deploy/services/human.py(+8 -0)📝
llama_deploy/services/tool.py(+12 -5)📝
llama_deploy/services/workflow.py(+5 -13)📝
pyproject.toml(+3 -2)📝
tests/apiserver/test_deployment.py(+5 -5)➕
tests/conftest.py(+17 -0)📝
tests/control_plane/test_server.py(+7 -6)...and 16 more files
📄 Description
Fixes #361
While working on #361 I found out it wasn't that easy to introduce the concept of topic in
SimpleMessageQueuebecause there wasn't a clear separation between "client" and "server". With other flavors of message queues, the client is the one responsible for managing consumers, while the server is the actual broker service (Redis, Kafka and the likes). But the simple message queue also has a "server" part that acts as an in-memory storage.With this PR, the server and the client are clearly separated, and only
SimpleMessageQueuederives fromAbstractMessageQueue, while the server class is just an object. This way, the simple message queue isn't special anymore, and it behaves exactly like the others.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.