mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-13 02:28:10 +00:00
Keep both C# and python http functions active when deploying (#2212)
* Kepp both C# and python http functions active when deploying * update logic * update log message * use the function name instead of a list
This commit is contained in:
@ -1121,8 +1121,16 @@ class Client:
|
||||
max_tries = 5
|
||||
for i in range(max_tries):
|
||||
try:
|
||||
# disable python function
|
||||
logger.info(f"disabling PYTHON function: {function_name}")
|
||||
# keep the python versions of http function to allow the service to be backward compatible
|
||||
# with older version of the CLI and the agents
|
||||
if function_name.startswith(
|
||||
"queue_"
|
||||
) or function_name.startswith("timer_"):
|
||||
logger.info(f"disabling PYTHON function: {function_name}")
|
||||
disable_python = "1"
|
||||
else:
|
||||
logger.info(f"enabling PYTHON function: {function_name}")
|
||||
disable_python = "0"
|
||||
subprocess.check_output(
|
||||
[
|
||||
func,
|
||||
@ -1135,7 +1143,7 @@ class Client:
|
||||
"--resource-group",
|
||||
self.application_name,
|
||||
"--settings",
|
||||
f"AzureWebJobs.{function_name}.Disabled=1",
|
||||
f"AzureWebJobs.{function_name}.Disabled={disable_python}",
|
||||
],
|
||||
env=dict(os.environ, CLI_DEBUG="1"),
|
||||
)
|
||||
|
Reference in New Issue
Block a user