(self)
return task.get('state', 'Unknown')
Returns a state string for the indexing process.
Returns a state string for the indexing process.
Returns a state string for the indexing process .
def state(self):
        """Returns a state string for the indexing process."""
        if not self._celery_task_id:
            return 'Unknown'

        tasks = self._sketch.api.check_celery_status(
            job_id=self._celery_task_id)

        if len(tasks) > 1:
            for task in tasks:
                if task.get('task_id', '') ==  self._celery_task_id:
                    return task.get('state', 'Unknown')

        task = tasks[0]
        return task.get('state', 'Unknown')
def state ( self ) : if not self . _celery_task_id : return 'Unknown' tasks = self . _sketch . api . check_celery_status ( job_id = self . _celery_task_id ) if len ( tasks ) > 1 : for task in tasks : if task . get ( 'task_id' , '' ) == self . _celery_task_id : return task . get ( 'state' , 'Unknown' ) task = tasks [ 0 ] return task . get ( 'state' , 'Unknown' )