Update unit test and preserve prior operational ordering in main.py

This commit is contained in:
sabaimran
2023-07-01 20:02:35 -07:00
parent ea9ae4ae28
commit 36537606da
2 changed files with 12 additions and 12 deletions

View File

@@ -64,7 +64,16 @@ def run():
logger.info("🌘 Starting Khoj")
if args.gui:
if not args.gui:
if not state.demo:
# Setup task scheduler
poll_task_scheduler()
# Start Server
configure_server(args, required=False)
configure_routes(app)
start_server(app, host=args.host, port=args.port, socket=args.socket)
else:
logger.warning("🚧 GUI is being deprecated and may not work as expected. Starting...")
# Setup GUI
gui = QtWidgets.QApplication([])
@@ -113,15 +122,6 @@ def run():
gui.exec()
if not state.demo:
# Setup task scheduler
poll_task_scheduler()
# Start Server
configure_server(args, required=False)
configure_routes(app)
start_server(app, host=args.host, port=args.port, socket=args.socket)
def sigint_handler(*args):
QtWidgets.QApplication.quit()