spiff-arena/spiffworkflow-backend/bin/start_blocking_appscheduler.py
burnettk 2afced3a51 Revert "Run event payloads data migration from background processor (#399)"
This reverts commit ab5926aab1e4c5dc89c415906873597b988d7f6e.
2023-07-19 11:43:42 -04:00

22 lines
540 B
Python
Executable File

"""Start the appscheduler in blocking mode."""
import time
from apscheduler.schedulers.background import BlockingScheduler # type: ignore
from spiffworkflow_backend import create_app
from spiffworkflow_backend import start_scheduler
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)
start_scheduler(app, BlockingScheduler)
if __name__ == "__main__":
main()