Skip to content

Commit 99a47a2

Browse files
committed
skip checking has http func
1 parent 7333a02 commit 99a47a2

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

azure_functions_worker/functions.py

-6
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ def __init__(self, function_name: str, msg: str) -> None:
4646

4747
class Registry:
4848
_functions: typing.MutableMapping[str, FunctionInfo]
49-
_has_http_func: bool = False
5049

5150
def __init__(self) -> None:
5251
self._functions = {}
@@ -57,8 +56,6 @@ def get_function(self, function_id: str) -> FunctionInfo:
5756

5857
return None
5958

60-
def has_http_func(self) -> bool:
61-
return self._has_http_func
6259

6360
@staticmethod
6461
def get_explicit_and_implicit_return(binding_name: str,
@@ -337,9 +334,6 @@ def add_func_to_registry_and_return_funcinfo(self, function,
337334

338335
self._functions[function_id] = function_info
339336

340-
if not self._has_http_func:
341-
self._has_http_func = function_info.is_http_func
342-
343337
return function_info
344338

345339
def add_function(self, function_id: str,

azure_functions_worker/http_v2.py

+1-9
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,7 @@ def http_v2_enabled(cls, functions=None, **kwargs):
220220
# If not checked yet, mark as checked
221221
cls._http_v2_enabled_checked = True
222222

223-
# Check if there are functions provided and if any of them has
224-
# HTTP triggers
225-
cls._http_v2_enabled = functions is not None and \
226-
functions.has_http_func()
227-
228-
# If HTTP functions are present, perform additional checks
229-
if cls._http_v2_enabled:
230-
# Check if HTTP/2 is enabled
231-
cls._http_v2_enabled = cls._check_http_v2_enabled()
223+
cls._http_v2_enabled = cls._check_http_v2_enabled()
232224

233225
# Return the result of HTTP/2 enablement
234226
return cls._http_v2_enabled

0 commit comments

Comments
 (0)