]> danix's work - publisher.git/commitdiff
fix: correct remove_article return type, emit started via QProcess signal
authorDanilo M. <redacted>
Sun, 3 May 2026 08:14:42 +0000 (10:14 +0200)
committerDanilo M. <redacted>
Sun, 3 May 2026 08:14:42 +0000 (10:14 +0200)
workers/git_worker.py
workers/hugo_worker.py

index 00e0069d3600c6c859f197b33040b4b767e49569..c04e4c381d7bc874d05680a34ed3037dd4b1bd44 100644 (file)
@@ -45,7 +45,7 @@ class GitWorker(QThread):
         return GitWorker(repo_path, ["git", "push", "origin", "production"], parent)
 
     @staticmethod
-    def remove_article(repo_path: Path, rel_path: str, slug: str, lang: str, parent=None) -> "GitWorker":
+    def remove_article(repo_path: Path, rel_path: str, slug: str, lang: str, parent=None) -> QThread:
         class _RmWorker(QThread):
             output = pyqtSignal(str)
             error = pyqtSignal(str)
index 23748a7ff8b9b1d318dec6bb5f0f176cbe031a2e..14bfd0b1b9ca7a27ddc2ee7f6ad5c748f127f901 100644 (file)
@@ -15,6 +15,7 @@ class HugoWorker(QObject):
         self._process.readyReadStandardOutput.connect(self._on_stdout)
         self._process.readyReadStandardError.connect(self._on_stderr)
         self._process.finished.connect(self._on_finished)
+        self._process.started.connect(self.started)
 
     @property
     def is_running(self) -> bool:
@@ -25,7 +26,6 @@ class HugoWorker(QObject):
             return
         self._process.setWorkingDirectory(str(self._repo_path))
         self._process.start("hugo", ["server", "-D"])
-        self.started.emit()
 
     def stop(self):
         if self.is_running: