forked from 3wordchant/capsul-flask
create capsul is working
This commit is contained in:
@ -27,16 +27,20 @@ def makeCapsulId():
|
||||
return f"capsul-{lettersAndNumbers}"
|
||||
|
||||
def double_check_capsul_address(id, ipv4):
|
||||
try:
|
||||
result = current_app.config["HUB_MODEL"].get(id)
|
||||
if result.ipv4 != ipv4:
|
||||
ipv4 = result.ipv4
|
||||
get_model().update_vm_ip(email=session["account"], id=id, ipv4=result.ipv4)
|
||||
except:
|
||||
current_app.logger.error(f"""
|
||||
the virtualization model threw an error in double_check_capsul_address of {id}:
|
||||
{my_exec_info_message(sys.exc_info())}"""
|
||||
)
|
||||
result = current_app.config["HUB_MODEL"].get(id)
|
||||
if result.ipv4 != ipv4:
|
||||
ipv4 = result.ipv4
|
||||
get_model().update_vm_ip(email=session["account"], id=id, ipv4=result.ipv4)
|
||||
# try:
|
||||
# result = current_app.config["HUB_MODEL"].get(id)
|
||||
# if result.ipv4 != ipv4:
|
||||
# ipv4 = result.ipv4
|
||||
# get_model().update_vm_ip(email=session["account"], id=id, ipv4=result.ipv4)
|
||||
# except:
|
||||
# current_app.logger.error(f"""
|
||||
# the virtualization model threw an error in double_check_capsul_address of {id}:
|
||||
# {my_exec_info_message(sys.exc_info())}"""
|
||||
# )
|
||||
|
||||
return ipv4
|
||||
|
||||
|
Reference in New Issue
Block a user