parameters: (self)
docstring: Override QRunnable::run. Provide the running part of the task that will
          start in an other thread.
docstring_summary: Override QRunnable::run. Provide the running part of the task that will
          start in an other thread.
docstring_tokens: Override QRunnable :: run . Provide the running part of the task that will start in an other thread .
function: def run(self):
          """
          Override QRunnable::run. Provide the running part of the task that will
          start in an other thread.
          """
          self.signals.started.emit(self)
          self.alg = sapi.AlgorithmManager.create(self.algName)
          errors = list()
          for (k, v) in self.properties.items():
              try:
                  self.alg.setProperty(k, v)
              except Exception as e:
                  errors.append(str(e))
          if errors:
              self.signals.finished.emit(self, 1, " - ".join(errors))
              return
          # setup the observer
          self.observer = DrillAlgorithmObserver()
          self.observer.observeFinish(self.alg)
          self.observer.observeError(self.alg)
          self.observer.signals.finished.connect(
                  lambda ret, msg : self.signals.finished.emit(self, ret, msg)
                  )
          self.observer.observeProgress(self.alg)
          self.observer.signals.progress.connect(
                  lambda p : self.signals.progress.emit(self, p)
                  )
          try:
              ret = self.alg.execute()
              if not ret:
                  self.signals.finished.emit(self, 1, "")
          except Exception as ex:
              self.signals.finished.emit(self, 1, str(ex))
          except KeyboardInterrupt:
              pass
function_tokens: def run ( self ) : self . signals . started . emit ( self ) self . alg = sapi . AlgorithmManager . create ( self . algName ) errors = list ( ) for ( k , v ) in self . properties . items ( ) : try : self . alg . setProperty ( k , v ) except Exception as e : errors . append ( str ( e ) ) if errors : self . signals . finished . emit ( self , 1 , " - " . join ( errors ) ) return # setup the observer self . observer = DrillAlgorithmObserver ( ) self . observer . observeFinish ( self . alg ) self . observer . observeError ( self . alg ) self . observer . signals . finished . connect ( lambda ret , msg : self . signals . finished . emit ( self , ret , msg ) ) self . observer . observeProgress ( self . alg ) self . observer . signals . progress . connect ( lambda p : self . signals . progress . emit ( self , p ) ) try : ret = self . alg . execute ( ) if not ret : self . signals . finished . emit ( self , 1 , "" ) except Exception as ex : self . signals . finished . emit ( self , 1 , str ( ex ) ) except KeyboardInterrupt : pass