Skip to content

Commit

Permalink
rename variables for @blinkdog
Browse files Browse the repository at this point in the history
  • Loading branch information
dsschult committed Dec 21, 2023
1 parent 3bae579 commit d9f4e15
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
15 changes: 10 additions & 5 deletions file_catalog/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,20 @@ class Config(Dict[str, Optional[Union[bool, int, str]]]):
'MONGODB_HOST': ConfigParamSpec('localhost', str, 'MongoDB host'),
'MONGODB_PORT': ConfigParamSpec(27017, int, 'MongoDB port'),
'MONGODB_URI': ConfigParamSpec(None, str, 'MongoDB URI'),
'ROUTESTATS_OVERLOAD_LIMIT': ConfigParamSpec(
240,
'ROUTESTATS_WINDOW_SIZE': ConfigParamSpec(
600,
int,
'Average query time in seconds to declare overload'
'Query window size to declare overload'
),
'ROUTESTATS_WINDOW_SIZE': ConfigParamSpec(
'ROUTESTATS_WINDOW_TIME': ConfigParamSpec(
600,
int,
'Query window size in seconds to declare overload'
'Query window time in seconds to declare overload'
),
'ROUTESTATS_TIMEOUT': ConfigParamSpec(
240,
int,
'Average query time in seconds to declare overload'
),
}

Expand Down
5 changes: 3 additions & 2 deletions file_catalog/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ def create(config: Dict[str, Any],
"db": mongo,
"debug": debug,
"route_stats": {
"window_time": config["ROUTESTATS_WINDOW_SIZE"],
"timeout": config["ROUTESTATS_OVERLOAD_LIMIT"],
"window_size": config["ROUTESTATS_WINDOW_SIZE"],
"window_time": config["ROUTESTATS_WINDOW_TIME"],
"timeout": config["ROUTESTATS_TIMEOUT"],
},
}
if 'CI_TEST_ENV' in os.environ:
Expand Down

0 comments on commit d9f4e15

Please sign in to comment.