mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-12 02:24:15 +00:00
e228ab4b80
ab9b5f368 Merge pull request #157 from sartography/feature/background_or_not_scheduler ba002f8a4 do not preload gunicorn w/ burnettk 8516154cf pyl now passes w/ burnettk dd0566b1a added script to start scheduler in its own process w/ burnettk danfunk 7d66f922f rename environment variable to something sensible. git-subtree-dir: spiffworkflow-backend git-subtree-split: ab9b5f368a0b954370e43936a88b2ce9b83dc4cc
18 lines
349 B
Python
18 lines
349 B
Python
"""Wait for db to be ready."""
|
|
import time
|
|
|
|
from spiffworkflow_backend import create_app
|
|
from spiffworkflow_backend.helpers.db_helper import try_to_connect
|
|
|
|
|
|
def main() -> None:
|
|
"""Main."""
|
|
app = create_app()
|
|
start_time = time.time()
|
|
with app.app_context():
|
|
try_to_connect(start_time)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|