# -*- coding: utf-8 -*-
"""
The module that runs the program.
"""
import time
import sys
import sqlalchemy.exc
import bjoern

CONNECTION_TRY_LIMIT = 7
CONNECTION_RETRY_TIME_LIMIT = 5

while True:
    try:
        from guest_book import app
        break
    except sqlalchemy.exc.OperationalError as error:
        if not CONNECTION_TRY_LIMIT:
            print(error)
            sys.exit(1)
        print('Waiting for connection...')
        CONNECTION_TRY_LIMIT -= 1
        time.sleep(CONNECTION_RETRY_TIME_LIMIT)


bjoern.run(
    app,
    host=app.config["APP_ADDRESS"],
    port=int(app.config["APP_PORT"]),
)

0deb89780636d5ba94bb148c621dc9bfd8369806
<mask token>

<mask token>
while True:
    try:
        from guest_book import app
        break
    except sqlalchemy.exc.OperationalError as error:
        if not CONNECTION_TRY_LIMIT:
            print(error)
            sys.exit(1)
        print('Waiting for connection...')
        CONNECTION_TRY_LIMIT -= 1
        time.sleep(CONNECTION_RETRY_TIME_LIMIT)
bjoern.run(app, host=app.config['APP_ADDRESS'], port=int(app.config[
    'APP_PORT']))

<mask token>
CONNECTION_TRY_LIMIT = 7
CONNECTION_RETRY_TIME_LIMIT = 5
while True:
    try:
        from guest_book import app
        break
    except sqlalchemy.exc.OperationalError as error:
        if not CONNECTION_TRY_LIMIT:
            print(error)
            sys.exit(1)
        print('Waiting for connection...')
        CONNECTION_TRY_LIMIT -= 1
        time.sleep(CONNECTION_RETRY_TIME_LIMIT)
bjoern.run(app, host=app.config['APP_ADDRESS'], port=int(app.config[
    'APP_PORT']))

<mask token>
import time
import sys
import sqlalchemy.exc
import bjoern
CONNECTION_TRY_LIMIT = 7
CONNECTION_RETRY_TIME_LIMIT = 5
while True:
    try:
        from guest_book import app
        break
    except sqlalchemy.exc.OperationalError as error:
        if not CONNECTION_TRY_LIMIT:
            print(error)
            sys.exit(1)
        print('Waiting for connection...')
        CONNECTION_TRY_LIMIT -= 1
        time.sleep(CONNECTION_RETRY_TIME_LIMIT)
bjoern.run(app, host=app.config['APP_ADDRESS'], port=int(app.config[
    'APP_PORT']))

# -*- coding: utf-8 -*-
"""
The module that runs the program.
"""
import time
import sys
import sqlalchemy.exc
import bjoern

CONNECTION_TRY_LIMIT = 7
CONNECTION_RETRY_TIME_LIMIT = 5

while True:
    try:
        from guest_book import app
        break
    except sqlalchemy.exc.OperationalError as error:
        if not CONNECTION_TRY_LIMIT:
            print(error)
            sys.exit(1)
        print('Waiting for connection...')
        CONNECTION_TRY_LIMIT -= 1
        time.sleep(CONNECTION_RETRY_TIME_LIMIT)


bjoern.run(
    app,
    host=app.config["APP_ADDRESS"],
    port=int(app.config["APP_PORT"]),
)
