mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-12 02:24:15 +00:00
5f2eab770c
1591ba436 black e0c09896d re-order imports the way backend always used to git-subtree-dir: spiffworkflow-backend git-subtree-split: 1591ba436dab5e1db2b37553de38be12ffdb705f
23 lines
541 B
Python
Executable File
23 lines
541 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()
|