def __call__(self):
        """Used to make each task object callable, in order to execute tasks in a consistent
        manner. Calls the task's entry method and provides some logging."""
        logger = make_default_logger(INTERNAL_LOGGER_NAME)

        task_name = self.__name__ + '.' + self._entry_mtd
        logger.info('\n%s\nExecuting task `%s`\n%s',
                    '-'*80, task_name, '-'*80)
        start = time()
        res = getattr(self, self._entry_mtd)()
        passed = str(timedelta(seconds=(time() - start)))
        logger.info('\n%s\nFinished executing task `%s`. Execution time: %s\n%s',
                    '-'*80, task_name, passed, '-'*80)

        return res
def __call__ ( self ) : logger = make_default_logger ( INTERNAL_LOGGER_NAME ) task_name = self . __name__ + '.' + self . _entry_mtd logger . info ( '\n%s\nExecuting task `%s`\n%s' , '-' * 80 , task_name , '-' * 80 ) start = time ( ) res = getattr ( self , self . _entry_mtd ) ( ) passed = str ( timedelta ( seconds = ( time ( ) - start ) ) ) logger . info ( '\n%s\nFinished executing task `%s`. Execution time: %s\n%s' , '-' * 80 , task_name , passed , '-' * 80 ) return res
Used to make each task object callable, in order to execute tasks in a consistent
        manner. Calls the task's entry method and provides some logging.