* Changed polling build error handling * Awaited pollBuildEvents for error to be thrown * fix: enhance error handling and logging in get_flow_events_response * fix: introduce custom exception for job queue not found error * fix: replace ValueError with custom JobQueueNotFoundError in get_flow_events_response * ⚡️ Speed up method `JobQueueService.get_queue_data` by 1,704% in PR #7387 (`fix/be_connection_errors`) (#7388) To optimize the `JobQueueService` implementation for better runtime and memory efficiency, we can implement some optimizations focused mainly on avoiding redundant checks and streamlining the handling of job queues. The most significant improvement that can be made without altering the functionality would be to remove redundant error logging and to optimize our coroutine handling. Here is the optimized version. ### Key Changes. 1. **Removed Redundant Logging**: The error logging inside the `get_queue_data` method was removed. In a production system where performance is critical, it’s often better to rely on exception handling rather than logging each potential error before raising the exception, especially for common errors which can be anticipated by the system. Instead, we directly raise `JobQueueNotFoundError`. 2. **Streamlined Exception Handling**: Replaced the dictionary lookup and manual check with a try-except block, simplifying the code and ensuring that the KeyError is handled efficiently. This avoids checking the condition and then looking up the dictionary again. 3. **Retained Essential Functionality**: All core functionalities and method signatures have been maintained, ensuring that the refactored code behaves identically to before. This includes maintaining the `self._closed` check to prevent operations on a closed service and handling of exceptions to provide appropriate error messages. By focusing on reducing redundant operations like extra logging and double-checking conditions, we improve the software’s runtime performance and maintain cleaner code. Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com> * fix: improve error handling in JobQueueService by raising JobQueueNotFoundError with original exception context * fix: update error message for job not found in test cases * fix: enhance error handling in cancel_build by adding JobQueueNotFoundError exception * fix: improve error handling in cancel_build by logging JobQueueNotFoundError details --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com> |
||
|---|---|---|
| .devcontainer | ||
| .github | ||
| .vscode | ||
| deploy | ||
| docker | ||
| docker_example | ||
| docs | ||
| scripts | ||
| src | ||
| test-results | ||
| .composio.lock | ||
| .env.example | ||
| .eslintrc.json | ||
| .gitattributes | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| DEVELOPMENT.md | ||
| eslint.config.js | ||
| LICENSE | ||
| Makefile | ||
| pyproject.toml | ||
| README.md | ||
| render.yaml | ||
| uv.lock | ||
Langflow is a powerful tool for building and deploying AI-powered agents and workflows. It provides developers with both a visual authoring experience and a built-in API server that turns every agent into an API endpoint that can be integrated into applications built on any framework or stack. Langflow comes with batteries included and supports all major LLMs, vector databases and a growing library of AI tools.
✨ Highlight features
- Visual Builder to get started quickly and iterate.
- Access to Code so developers can tweak any component using Python.
- Playground to immediately test and iterate on their flows with step-by-step control.
- Multi-agent orchestration and conversation management and retrieval.
- Deploy as an API or export as JSON for Python apps.
- Observability with LangSmith, LangFuse and other integrations.
- Enterprise-ready security and scalability.
⚡️ Quickstart
Langflow works with Python 3.10 to 3.13.
Install with uv (recommended)
uv pip install langflow
Install with pip
pip install langflow
📦 Deployment
Self-managed
Langflow is completely open source and you can deploy it to all major deployment clouds. Follow this guide to learn how to use Docker to deploy Langflow.
Fully-managed by DataStax
DataStax Langflow is a full-managed environment with zero setup. Developers can sign up for a free account to get started.
⭐ Stay up-to-date
Star Langflow on GitHub to be instantly notified of new releases.
👋 Contribute
We welcome contributions from developers of all levels. If you'd like to contribute, please check our contributing guidelines and help make Langflow more accessible.