Fix build failure and optimize imports

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-12-13 19:08:35 -03:00
commit 372f39bcad
3 changed files with 2 additions and 6 deletions

View file

@ -178,7 +178,6 @@ async def stream_build(
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 = {

View file

@ -1,7 +1,6 @@
from typing import TYPE_CHECKING
from langflow.services.cache.service import (BaseCacheService, InMemoryCache,
RedisCache)
from langflow.services.cache.service import BaseCacheService, InMemoryCache, RedisCache
from langflow.services.factory import ServiceFactory
from langflow.utils.logger import logger

View file

@ -148,9 +148,7 @@ class DatabaseService(Service):
try:
command.check(alembic_cfg)
except Exception as exc:
if isinstance(
exc, (util.exc.CommandError, util.exc.AutogenerateDiffsDetected)
):
if isinstance(exc, (util.exc.CommandError, util.exc.AutogenerateDiffsDetected)):
command.upgrade(alembic_cfg, "head")
time.sleep(3)