Update poll_task_status sleep time
This commit is contained in:
parent
4b54a9d234
commit
64e8d4bbc7
2 changed files with 7 additions and 5 deletions
|
|
@ -24,7 +24,7 @@ def run_post(client, flow_id, headers, post_data):
|
|||
|
||||
|
||||
# Helper function to poll task status
|
||||
def poll_task_status(client, headers, href, max_attempts=20, sleep_time=3):
|
||||
def poll_task_status(client, headers, href, max_attempts=20, sleep_time=2):
|
||||
for _ in range(max_attempts):
|
||||
task_status_response = client.get(
|
||||
href,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
import json
|
||||
|
||||
import pytest
|
||||
from langchain.chains.base import Chain
|
||||
from langflow.processing.process import load_flow_from_json
|
||||
from langflow.graph import Graph
|
||||
from langflow.utils.payload import get_root_node
|
||||
from langflow.processing.process import load_flow_from_json
|
||||
from langflow.utils.payload import get_root_vertex
|
||||
|
||||
|
||||
def test_load_flow_from_json():
|
||||
|
|
@ -22,14 +23,15 @@ def test_load_flow_from_json_with_tweaks():
|
|||
assert loaded.llm.model_name == "test model"
|
||||
|
||||
|
||||
def test_get_root_node():
|
||||
def test_get_root_vertex():
|
||||
with open(pytest.BASIC_EXAMPLE_PATH, "r") as f:
|
||||
flow_graph = json.load(f)
|
||||
data_graph = flow_graph["data"]
|
||||
nodes = data_graph["nodes"]
|
||||
edges = data_graph["edges"]
|
||||
graph = Graph(nodes, edges)
|
||||
root = get_root_node(graph)
|
||||
root = get_root_vertex(graph)
|
||||
assert root is not None
|
||||
assert hasattr(root, "id")
|
||||
assert hasattr(root, "data")
|
||||
assert hasattr(root, "data")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue