You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: FALKORDB_PORT default type inconsistency across modules #582
FALKORDB_PORT is retrieved with inconsistent default types across modules:
Integer default (5 locations):
# api/graph.py, api/git_utils/git_graph.py, api/llm.pyport=os.getenv('FALKORDB_PORT', 6379) # default is int
String default with explicit cast (1 location):
# api/info.pyport=int(os.getenv('FALKORDB_PORT', "6379")) # default is str, explicitly cast
os.getenv() always returns a string when the var is set. When it's not set, the default 6379 (int) is passed directly to the port parameter. Depending on how the FalkorDB client handles the port parameter, this may work by accident or fail silently.
Suggested Fix
Consistently use:
port=int(os.getenv('FALKORDB_PORT', '6379'))
Or better yet, centralize configuration in a single place.
Activity