Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

Procházet zdrojové kódy

Apply comments from review - thx @mih

Adina Wagner před 2 roky
rodič
revize
13bd930a5f
1 změnil soubory, kde provedl 18 přidání a 4 odebrání
  1. 18 4
      datalad_gooey/app.py

+ 18 - 4
datalad_gooey/app.py

@@ -32,7 +32,10 @@ from datalad import cfg as dlcfg
 from datalad import __version__ as dlversion
 import datalad.ui as dlui
 from datalad.interface.base import Interface
-from datalad.local.wtf import _render_report
+from datalad.local.wtf import (
+    _render_report,
+    WTF,
+)
 from datalad.utils import chpwd
 
 from .utils import (
@@ -151,6 +154,9 @@ class GooeyApp(QObject):
             self._get_info)
         self.main_window.actionDiagnostic_infos.triggered.connect(
             self._get_diagnostic_info)
+        # connect the diagnostic WTF helper
+        self._cmdexec.results_received.connect(
+            self._app_cmdexec_results_handler)
         # reset the command configuration tab whenever the item selection in
         # tree view changed.
         # This behavior was originally requested in
@@ -310,19 +316,27 @@ class GooeyApp(QObject):
                 on_failure='ignore',
                 return_type='generator',
             )),
-            MappingProxyType(dict())
+            MappingProxyType(dict(
+                preferred_result_interval=0.2,
+                result_override=dict(
+                    secret_handshake=True,
+                ),
+            )),
         )
-        self._cmdexec.results_received.connect(
-            self._app_cmdexec_results_handler)
+
 
     @Slot(Interface, list)
     def _app_cmdexec_results_handler(self, cls, res):
+        if cls != WTF:
+            return
         for r in res:
             self._wtf_result_receiver(r)
 
     def _wtf_result_receiver(self, res):
         if not res['action'] == 'wtf':
             return
+        if not res.get('secret_handshake'):
+            return
         if res['status'] != 'ok':
             msg = "Internal error creating diagnostic information"
         else: