Kill all reco processes when storage manager goes down
authorjniedzie <jeremi.niedziela@cern.ch>
Tue, 11 Nov 2014 11:02:09 +0000 (12:02 +0100)
committerjniedzie <jeremi.niedziela@cern.ch>
Tue, 2 Dec 2014 10:58:05 +0000 (11:58 +0100)
MONITOR/alistoragemanager/AliDIMListenerThread.cxx
MONITOR/alistoragemanager/AliStorageClientThread.cxx

index be58af3..1ad3da6 100644 (file)
@@ -52,9 +52,13 @@ AliDIMListenerThread::AliDIMListenerThread() :
 
 AliDIMListenerThread::~AliDIMListenerThread()
 {
+  cout<<"AliDIMListenerThread -- destructor called...";
   if(fDimSORListener){delete fDimSORListener;fDimSORListener = 0;}
   if(fDimEORListener){delete fDimEORListener;fDimEORListener = 0;}
 
+  // kill all running reconstructions (to be changed later)
+    gSystem->Exec(Form("ssh -n -f %s@%s \"killall alionlinereco\"",fOnlineReconstructionUsername.c_str(),fOnlineReconstructionHostname.c_str()));
+
   /*
     for (int i = 0; i < 5; ++i){
         if(fDimSORListener[i]) delete fDimSORListener[i];
@@ -63,6 +67,7 @@ AliDIMListenerThread::~AliDIMListenerThread()
         fDimSORListener[i] = 0;
         fDimEORListener[i] = 0;
        }*/
+  cout<<"OK"<<endl;
 }
 
 void AliDIMListenerThread::InitDIMListeners()
index 25ff3f8..7668226 100644 (file)
@@ -72,6 +72,7 @@ fRemoveEventsPercentage(0)
 AliStorageClientThread::~AliStorageClientThread()
 {
     while(!gClientQuit){sleep(1);}
+    if(fDIMListenerThread){delete fDIMListenerThread;}
     fEventsCollectorThread->Kill();
     fCommunicationThread->Kill();
-}
\ No newline at end of file
+}