-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
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.py
port=os.getenv('FALKORDB_PORT', 6379) # default is intString default with explicit cast (1 location):
# api/info.py
port=int(os.getenv('FALKORDB_PORT', "6379")) # default is str, explicitly castos.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.
Context
Found during code review of PR #522.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working