Closed GitHK closed 2 years ago
another one currently happening @sanderegg @pcrespov
Problem is recurring and seems to come from here:
async def get_all_node_ids_from_workbenches(
self, project_uuid: str = None
) -> Set[str]:
"""Returns a set containing all the workbench node_ids from all projects
If a project_uuid is passed, only that project's workbench nodes will be included
"""
if project_uuid is None:
query = "SELECT json_object_keys(projects.workbench) FROM projects"
else:
query = f"SELECT json_object_keys(projects.workbench) FROM projects WHERE projects.uuid = '{project_uuid}'"
async with self.engine.acquire() as conn:
result = set()
query_result = await conn.execute(query)
async for row in query_result:
result.update(set(row.values()))
return result
@pcrespov I guess the part with
result.update(set(row.values()))
is synchronous. Maybe we should use fetchall instead...
Also it is funny that suddenly it started showing. I guess this might be linked with the new SQLAlchemy? this would imply it became very slightly slower and it now shows
this part of the code does not exist anymore.
Webserver was restarted and running for a few minutes and this started showing up.