mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-02-23 06:58:10 +00:00
* Revert "Revert "Feature/event payloads (#393)"" This reverts commit 9bc4a68f2d0679f0625f8e01bf9af15008833daa. * Revert "Revert "poet not available in container"" This reverts commit 5c68e5817e72ee1aec6418c96f0afe115aee9f15. * Revert "Revert "Run event payloads data migration from background processor (#399)"" This reverts commit b04284ac9c52a913ce32d8e76aee3495ac6e2dbf. * Revert "Revert "using new spiff api to get info about events. w/ elizabeth"" This reverts commit f00e4b416cd978da979c510381f077dff9fe6c50. * Revert "Revert "fix tests for waiting_event_can_be_skipped"" This reverts commit de2ea98daa2c0f75dd12246588601bd33b64617b. * push image for preview env * default scripts to localhost w/ burnettk * use the bugfix/update-split-task-inputs spiffworkflow branch w/ burnettk * removed debug json files * use main for spiffworkflow * do not attempt to highlight non-diagram boundary items w/ burnettk * updated SpiffWorkflow to fix multiple signal event issue w/ burnettk --------- Co-authored-by: burnettk <burnettk@users.noreply.github.com> Co-authored-by: jasquat <jasquat@users.noreply.github.com>
35 lines
1.0 KiB
Python
Executable File
35 lines
1.0 KiB
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.data_migrations.version_1_3 import VersionOneThree
|
|
from spiffworkflow_backend.helpers.db_helper import try_to_connect
|
|
|
|
|
|
def main() -> None:
|
|
seconds_to_wait = 300
|
|
print(f"sleeping for {seconds_to_wait} seconds to give the api container time to run the migration")
|
|
time.sleep(seconds_to_wait)
|
|
print("done sleeping")
|
|
|
|
print("running data migration from background processor")
|
|
app = create_app()
|
|
start_time = time.time()
|
|
|
|
with app.app_context():
|
|
try_to_connect(start_time)
|
|
VersionOneThree().run()
|
|
|
|
end_time = time.time()
|
|
print(
|
|
f"done running data migration from background processor. took {end_time - start_time} seconds. starting"
|
|
" scheduler"
|
|
)
|
|
start_scheduler(app, BlockingScheduler)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|