()
| 678 | |
| 679 | |
| 680 | def start_server(): |
| 681 | sysargs = sys.argv[1:] |
| 682 | configfile, args = sysargs[0], sysargs[1:] |
| 683 | web.ol_configfile = configfile |
| 684 | |
| 685 | # # type: (str) -> None |
| 686 | |
| 687 | load_config(web.ol_configfile) |
| 688 | setup_requests() |
| 689 | |
| 690 | # sentry loaded by infogami |
| 691 | infogami._setup() |
| 692 | |
| 693 | if "pytest" not in sys.modules: |
| 694 | web.amazon_lookup_thread = make_amazon_lookup_thread() |
| 695 | thread_is_alive = bool(web.amazon_lookup_thread and web.amazon_lookup_thread.is_alive()) |
| 696 | logger.critical(f"web.amazon_lookup_thread.is_alive() is {thread_is_alive}") |
| 697 | else: |
| 698 | logger.critical("Not starting amazon_lookup_thread in pytest") |
| 699 | |
| 700 | sys.argv = [sys.argv[0]] + list(args) |
| 701 | app.run() |
| 702 | |
| 703 | |
| 704 | def start_gunicorn_server(): |
no test coverage detected