mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-25 11:10:43 +08:00
Add time_elapsed variable to track the elapsed time during stream_build()
This commit is contained in:
@ -142,7 +142,7 @@ async def stream_build(
|
||||
|
||||
number_of_nodes = len(graph.vertices)
|
||||
update_build_status(cache_service, flow_id, BuildStatus.IN_PROGRESS)
|
||||
|
||||
time_elapsed = ""
|
||||
try:
|
||||
user_id = flow_cache["user_id"]
|
||||
except KeyError:
|
||||
@ -175,8 +175,10 @@ async def stream_build(
|
||||
logger.exception(exc)
|
||||
params = str(exc)
|
||||
valid = False
|
||||
time_elapsed = format_elapsed_time(time.perf_counter() - start_time)
|
||||
update_build_status(cache_service, flow_id, BuildStatus.FAILURE)
|
||||
|
||||
|
||||
vertex_id = vertex.parent_node_id if vertex.parent_is_top_level else vertex.id
|
||||
if vertex_id in graph.top_level_vertices:
|
||||
response = {
|
||||
|
||||
Reference in New Issue
Block a user