diff --git a/panoptic_back/panoptic/main.py b/panoptic_back/panoptic/main.py index 26fbe07f..527bbd17 100644 --- a/panoptic_back/panoptic/main.py +++ b/panoptic_back/panoptic/main.py @@ -11,13 +11,13 @@ import qtawesome as qta import requests import uvicorn -from PyQt5.QtCore import QSize, QThread, pyqtSignal +from PyQt5.QtCore import QSize from PyQt5.QtGui import QCursor import panoptic from panoptic.utils import get_datadir -PORT = 2626 +PORT = 8000 HOST = False THREAD = None @@ -35,16 +35,6 @@ def api(path): QPushButton, QLineEdit, QFileDialog, QListWidget, QDesktopWidget from PyQt5 import QtCore, QtGui -class InitThread(QThread): - initialization_complete = pyqtSignal() - - def __init__(self, ui): - super().__init__() - self.ui = ui - - def run(self): - self.ui.init_projects() - self.initialization_complete.emit() class IconLabel(QWidget): @@ -334,15 +324,6 @@ def load_project(self, event=None): requests.post(api("project"), json={"project": os.environ["PANOPTIC_DATA"]}) self.init_folders() - def start_init_thread(self): - self.init_projects() - self.on_initialization_complete() - # self.init_thread = InitThread(self) - # self.init_thread.initialization_complete.connect(self.on_initialization_complete) - # self.init_thread.start() - - def on_initialization_complete(self): - self._set_processing(False, "Initialisation terminée") def on_fastapi_start(): ui.server_status.setText('Initialisation...') @@ -403,7 +384,7 @@ def start(): global ui ui = MiniUI() ui.show() - ui.start_init_thread() + ui.init_projects() sys.exit(app.exec_()) else: if not FOLDER: