Skip to content

Commit

Permalink
better persistence
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Reynolds committed Aug 21, 2024
1 parent 715c9c0 commit c2694ed
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions base/app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,23 @@ def send_sqs(meta: dict, kill: bool=False) -> dict|None:
def main():
"""
Main Function
"""
"""
metadata = query_metadata()
labInfo = get_lab_info(metadata)
sqsMeta = build_sqs_meta(metadata, labInfo)

petName = load_state("petname")
if not petName:
first_deploy = False
deploy = load_state("depID")
if deploy != metadata["depID"]:
first_deploy = True
save_state("depID", metadata["depID"])

if first_deploy:
petName = generate_petname()
else:
petName = load_state("petname")
if not petName:
petName = generate_petname()

app = Flask(__name__)

Expand Down

0 comments on commit c2694ed

Please sign in to comment.