def subtask(self, func, *args, **kw):
        """
        Helper function for tasks needing to run subthreads. Takes care of 
        remembering that the subtask is running, and of cleaning up after it.
        Example starting a simple.Task():
          backend.subtask(task.ignore, 1, 'a', verbose=False)
        
        *args and **kw will be propagated to `func`.
        """
        self.started_task()
        try:
            func(*args, **kw)
        except Exception:
            self.log(ERROR, 'Subtask %s(*%s, **%s) failed!' % (func, args, kw))
        finally:
            self.finished_task()
def subtask ( self , func , * args , ** kw ) : self . started_task ( ) try : func ( * args , ** kw ) except Exception : self . log ( ERROR , 'Subtask %s(*%s, **%s) failed!' % ( func , args , kw ) ) finally : self . finished_task ( )
Helper function for tasks needing to run subthreads. Takes care of 
        remembering that the subtask is running, and of cleaning up after it.
        Example starting a simple.Task():
          backend.subtask(task.ignore, 1, 'a', verbose=False)
        
        *args and **kw will be propagated to `func`.