ClassFilterDone
Some checks failed
K8S Fission Deployment / Deployment fission functions (push) Failing after 11s
Some checks failed
K8S Fission Deployment / Deployment fission functions (push) Failing after 11s
This commit is contained in:
@@ -94,3 +94,13 @@ def check_port_open(ip: str, port: int, timeout: int = 30):
|
||||
except Exception as err:
|
||||
current_app.logger.err(f"Check port open error: {err}")
|
||||
return False
|
||||
|
||||
def str_to_bool(value: str | None) -> typing.Optional[bool]:
|
||||
if value is None:
|
||||
return None
|
||||
val = value.strip().lower()
|
||||
if val in ("true", "1", "yes"):
|
||||
return True
|
||||
if val in ("false", "0", "no"):
|
||||
return False
|
||||
return None
|
||||
Reference in New Issue
Block a user