[PR #266] [MERGED] drop and restore idle workflows in workflow server #273

Closed
opened 2026-02-16 02:17:06 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/workflows-py/pull/266
Author: @adrianlyjak
Created: 1/7/2026
Status: Merged
Merged: 1/12/2026
Merged by: @adrianlyjak

Base: mainHead: adrian/idle-wf-server


📝 Commits (10+)

📊 Changes

24 files changed (+1623 additions, -169 deletions)

View changed files

.changeset/green-spoons-help.md (+5 -0)
📝 .pre-commit-config.yaml (+1 -1)
📝 packages/llama-index-workflows/src/workflows/events.py (+16 -0)
📝 packages/llama-index-workflows/src/workflows/plugins/basic.py (+11 -5)
📝 packages/llama-index-workflows/src/workflows/protocol/__init__.py (+7 -0)
📝 packages/llama-index-workflows/src/workflows/runtime/control_loop.py (+21 -1)
📝 packages/llama-index-workflows/src/workflows/server/abstract_workflow_store.py (+2 -0)
packages/llama-index-workflows/src/workflows/server/keyed_lock.py (+54 -0)
📝 packages/llama-index-workflows/src/workflows/server/memory_workflow_store.py (+5 -0)
📝 packages/llama-index-workflows/src/workflows/server/server.py (+270 -54)
packages/llama-index-workflows/src/workflows/server/sqlite/migrations/0003_add_idle_since.sql (+4 -0)
📝 packages/llama-index-workflows/src/workflows/server/sqlite/sqlite_workflow_store.py (+13 -4)
📝 packages/llama-index-workflows/tests/runtime/conftest.py (+1 -1)
📝 packages/llama-index-workflows/tests/runtime/test_control_loop_transformations.py (+90 -18)
packages/llama-index-workflows/tests/server/test_idle_release.py (+780 -0)
packages/llama-index-workflows/tests/server/test_idle_release_live_http.py (+69 -0)
packages/llama-index-workflows/tests/server/test_keyed_lock.py (+127 -0)
📝 packages/llama-index-workflows/tests/server/test_server.py (+0 -1)
📝 packages/llama-index-workflows/tests/server/test_server_endpoints.py (+6 -1)
📝 packages/llama-index-workflows/tests/server/test_server_live_http.py (+10 -54)

...and 4 more files

📄 Description

Updates workflow server with functionality to drop and restore idle workflow handlers that are waiting on external input.

Adds an additional internal event to detect failed messages, such that a workflow can be returned to idle for an edge case where a non-handled event could awaken the handler without notifying that it was still actually idle

Fixes #191


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/run-llama/workflows-py/pull/266 **Author:** [@adrianlyjak](https://github.com/adrianlyjak) **Created:** 1/7/2026 **Status:** ✅ Merged **Merged:** 1/12/2026 **Merged by:** [@adrianlyjak](https://github.com/adrianlyjak) **Base:** `main` ← **Head:** `adrian/idle-wf-server` --- ### 📝 Commits (10+) - [`563babb`](https://github.com/run-llama/workflows-py/commit/563babb74770553589fc4a60dfccad00e3490ce8) wip - [`0732e59`](https://github.com/run-llama/workflows-py/commit/0732e598c9889cb645c443c2cefbe64510988f21) is_idle; - [`bdabbc3`](https://github.com/run-llama/workflows-py/commit/bdabbc329795004cae4a7cb83af75eaf3bd0d7cf) ftdd - [`d8f0040`](https://github.com/run-llama/workflows-py/commit/d8f00407b05541b6f125492ded992121b82a55e9) better - [`b87a00c`](https://github.com/run-llama/workflows-py/commit/b87a00c39e8ebcc742b52318325575d1cd00d90d) wip - [`971e9f6`](https://github.com/run-llama/workflows-py/commit/971e9f6db01af24a978cac6c60e1a6a6007dba45) iterate on server - [`9543a1c`](https://github.com/run-llama/workflows-py/commit/9543a1c3fad09f1c7f3ace47365abe9b22763246) working on it - [`10f6f94`](https://github.com/run-llama/workflows-py/commit/10f6f949c8e481b0ae6422a5b50f1de522b033d8) iterate - [`4a8498b`](https://github.com/run-llama/workflows-py/commit/4a8498bb6222ec261aaf68ece518ce480984d35f) wip - [`a0f6797`](https://github.com/run-llama/workflows-py/commit/a0f67973244ed67029a233b40885899372484a35) fix pre-commit ### 📊 Changes **24 files changed** (+1623 additions, -169 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/green-spoons-help.md` (+5 -0) 📝 `.pre-commit-config.yaml` (+1 -1) 📝 `packages/llama-index-workflows/src/workflows/events.py` (+16 -0) 📝 `packages/llama-index-workflows/src/workflows/plugins/basic.py` (+11 -5) 📝 `packages/llama-index-workflows/src/workflows/protocol/__init__.py` (+7 -0) 📝 `packages/llama-index-workflows/src/workflows/runtime/control_loop.py` (+21 -1) 📝 `packages/llama-index-workflows/src/workflows/server/abstract_workflow_store.py` (+2 -0) ➕ `packages/llama-index-workflows/src/workflows/server/keyed_lock.py` (+54 -0) 📝 `packages/llama-index-workflows/src/workflows/server/memory_workflow_store.py` (+5 -0) 📝 `packages/llama-index-workflows/src/workflows/server/server.py` (+270 -54) ➕ `packages/llama-index-workflows/src/workflows/server/sqlite/migrations/0003_add_idle_since.sql` (+4 -0) 📝 `packages/llama-index-workflows/src/workflows/server/sqlite/sqlite_workflow_store.py` (+13 -4) 📝 `packages/llama-index-workflows/tests/runtime/conftest.py` (+1 -1) 📝 `packages/llama-index-workflows/tests/runtime/test_control_loop_transformations.py` (+90 -18) ➕ `packages/llama-index-workflows/tests/server/test_idle_release.py` (+780 -0) ➕ `packages/llama-index-workflows/tests/server/test_idle_release_live_http.py` (+69 -0) ➕ `packages/llama-index-workflows/tests/server/test_keyed_lock.py` (+127 -0) 📝 `packages/llama-index-workflows/tests/server/test_server.py` (+0 -1) 📝 `packages/llama-index-workflows/tests/server/test_server_endpoints.py` (+6 -1) 📝 `packages/llama-index-workflows/tests/server/test_server_live_http.py` (+10 -54) _...and 4 more files_ </details> ### 📄 Description Updates workflow server with functionality to drop and restore idle workflow handlers that are waiting on external input. Adds an additional internal event to detect failed messages, such that a workflow can be returned to idle for an edge case where a non-handled event could awaken the handler without notifying that it was still actually idle Fixes #191 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 02:17:06 -05:00
yindo closed this issue 2026-02-16 02:17:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/workflows-py#273