Przeglądaj źródła

Bug: 83900 Fix issue with dfu jobs left running

If an exception occured within runWU within dfu server, it would leave the
dfu workunit tracked as running (within /Status/Server in Dali).
Consequently queuedJobs as used by EclWatch would still think the jobs were
running and list them as such on the Activity page

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Jake Smith 14 lat temu
rodzic
commit
ab6827131a
1 zmienionych plików z 7 dodań i 1 usunięć
  1. 7 1
      dali/dfu/dfurun.cpp

+ 7 - 1
dali/dfu/dfurun.cpp

@@ -253,7 +253,13 @@ class CDFUengine: public CInterface, implements IDFUengine
                         case DFUservermode_run: {
                                 PROGLOG("DFU %s running job: %s",serv,wuid.get());
                                 setRunningStatus(queuename.get(),wuid,true);
-                                parent->runWU(wuid);
+                                try {
+                                    parent->runWU(wuid);
+                                }
+                                catch (IException *) {
+                                    setRunningStatus(queuename.get(),wuid,false);
+                                    throw;
+                                }
                                 if (!ismon) {
                                     setRunningStatus(queuename.get(),wuid,false);
                                     PROGLOG("DFU %s finished job: %s",serv,wuid.get());