Bläddra i källkod

Merge branch 'develop' into feature/#949-cli-refactoring

Đỗ Trường Giang 1 år sedan
förälder
incheckning
db6ee32177

+ 4 - 4
frontend/taipy-gui/src/components/Taipy/tableUtils.tsx

@@ -593,16 +593,16 @@ export const EditableCell = (props: EditableCellProps) => {
                         <Button size="small" onClick={onSelect} sx={ButtonSx}>
                             {formatValue(button[0] as RowValue, colDesc, formatConfig, nanValue)}
                         </Button>
-                    ) : val !== null && val !== undefined && colDesc.type && colDesc.type.startsWith("bool") ? (
+                    ) : value !== null && value !== undefined && colDesc.type && colDesc.type.startsWith("bool") ? (
                         <Switch
-                            checked={val as boolean}
+                            checked={value as boolean}
                             size="small"
-                            title={val ? "True" : "False"}
+                            title={value ? "True" : "False"}
                             sx={defaultCursorIcon}
                         />
                     ) : (
                         <span style={defaultCursor}>
-                            {formatValue(val as RowValue, colDesc, formatConfig, nanValue)}
+                            {formatValue(value as RowValue, colDesc, formatConfig, nanValue)}
                         </span>
                     )}
                     {onValidation && !button ? (

+ 12 - 2
taipy/core/_orchestrator/_dispatcher/_job_dispatcher.py

@@ -11,6 +11,7 @@
 
 import threading
 import time
+import traceback
 from abc import abstractmethod
 from queue import Empty
 from typing import Optional
@@ -147,5 +148,14 @@ class _JobDispatcher(threading.Thread):
 
     @staticmethod
     def _update_job_status(job: Job, exceptions):
-        job.update_status(exceptions)
-        _JobManagerFactory._build_manager()._set(job)
+        """Update the job status based on the success or the failure of its execution."""
+        if exceptions:
+            job.failed()
+            _TaipyLogger._get_logger().error(f" {len(exceptions)} errors occurred during execution of job {job.id}")
+            for e in exceptions:
+                st = "".join(traceback.format_exception(type(e), value=e, tb=e.__traceback__))
+                job._stacktrace.append(st)
+                _TaipyLogger._get_logger().error(st)
+            _JobManagerFactory._build_manager()._set(job)
+        else:
+            job.completed()

+ 0 - 13
taipy/core/job/job.py

@@ -11,7 +11,6 @@
 
 __all__ = ["Job"]
 
-import traceback
 from datetime import datetime
 from typing import TYPE_CHECKING, Any, Callable, List, Optional
 
@@ -313,18 +312,6 @@ class Job(_Entity, _Labeled):
         if functions:
             self._on_status_change(*functions)
 
-    def update_status(self, exceptions):
-        """Update the job status based on the success or the failure of its execution."""
-        if exceptions:
-            self.failed()
-            self.__logger.error(f" {len(exceptions)} errors occurred during execution of job {self.id}")
-            for e in exceptions:
-                st = "".join(traceback.format_exception(type(e), value=e, tb=e.__traceback__))
-                self._stacktrace.append(st)
-                self.__logger.error(st)
-        else:
-            self.completed()
-
     def __hash__(self):
         return hash(self.id)