def n_executions(self):
        """
        Queries and returns the number of past task executions.
        """
        pipeline = self.tiger.connection.pipeline()
        pipeline.exists(self.tiger._key('task', self.id))
        pipeline.llen(self.tiger._key('task', self.id, 'executions'))
        exists, n_executions = pipeline.execute()
        if not exists:
            raise TaskNotFound('Task {} not found.'.format(
                self.id
            ))
        return n_executions
def n_executions ( self ) : pipeline = self . tiger . connection . pipeline ( ) pipeline . exists ( self . tiger . _key ( 'task' , self . id ) ) pipeline . llen ( self . tiger . _key ( 'task' , self . id , 'executions' ) ) exists , n_executions = pipeline . execute ( ) if not exists : raise TaskNotFound ( 'Task {} not found.' . format ( self . id ) ) return n_executions
Queries and returns the number of past task executions.