def run_in_background(self, f, *args, **kwargs): """ Runs the given function f in the background thread/process. Add args and kwargs to pass them to the function. """ self.fire(task(f, *args, **kwargs), self._get_channel_name())
def run_in_background(self, f, *args, **kwargs): """ Runs the given function f in the background thread/process. Add args and kwargs to pass them to the function. """ self._worker.fire(task(f, *args, **kwargs), self._get_channel_name())
def run_in_background(self, f, *args, **kwargs): """ Runs the given function f in the background thread/process. Add args and kwargs to pass them to the function. """ self._worker.fire(task(f, *args, **kwargs), self._get_channel_name()) # def on_stop(self): # """ # Clean up the threads/background processes we used. Make sure you call this function in a derived class # using super! # :return: # """ # # NOTE: this is already handled in the Worker wrapper class above! # self._worker.pool.terminate() # log.debug("threaded app STOPPED WORKER!") # super(ThreadedApplication, self).on_stop()
def run_in_background(self, f, *args, **kwargs): self.fire(task(f, *args, **kwargs), self._get_channel_name())