Complete current task
        :return:
        :rtype: requests.models.Response
164747
def complete(self):
        
        return self._post_request(
            data='',
            endpoint=self.ENDPOINT + '/' + str(self.id) + '/complete'
        )
1064347
def get_progress(self):
        

        count_remaining = len(self.items_queued) + len(self.items_in_progress)
        percentage_remaining = 100 / self.count_total * count_remaining

        return 100 - percentage_remaining
515101
def complete_request(self, account_id, request_id, **params):
        """"""
        response = self._post(
            'v2', 'accounts', account_id, 'transactions', request_id,
            'complete', data=params)
        return self._make_api_object(response, APIObject)
471471
def _result_handler(self, response: Dict[str, Any]):
        
        res = response.get("MESSAGE")
        ID = res.get("ID")
        result = res.get("RESULT")
        fut = self.tasks.get(ID)
        fut.set_result(result)
        return True
436921
def context_complete(context_id):
    """"""
    logging.info('Context %s is.......... DONE.', context_id)

    from furious.context import get_current_async_with_context

    _, context = get_current_async_with_context()

    if not context:
        logging.error("Could not load context")
        return

    for task_id, result in context.result.items():
        logging.info("#########################")
        logging.info("Task Id: %s and Result: %s", task_id, result)

    return context_id
1016805
def get_results(self, **kwargs):
        
        # Check whether the process completed.
        if self.returncode is None:
            raise self.Error("return code is None, you should call wait, communicate or poll")

        if self.status is None or self.status < self.S_DONE:
            raise self.Error("Task is not completed")

        return self.Results.from_node(self)
1373463
def finish(self):
        
        if self._has_responded:
            raise NSQException('already responded')
        self._has_responded = True
        self.on_finish.send(self)
573029
def execute(self):
        
        url = os.path.join(self.HTTP_ENDPOINT, self.format)
        self.response = ExportResponse.load_http_response(
            self.session.post(url, data=self.json_payload)
        )
        return self.response.result
1133166
def done(self):
        
        return self._exception != self._SENTINEL or self._result != self._SENTINEL
411070
def progress(self):
        
        return Progress(
            done=len(self._get_all_set_properties()),
            base=len(worker_mapping()),
        )
421959
def run(self):
        '''
        '''
        if self.verbose:
            pbar = tqdm(total=100)
        while True:
            task_remain = self._task_queue.qsize()
            task_finished = int((float(self.total_task - task_remain) /
                                 float(self.total_task)) * 100)
            if task_finished % 20 == 0 and task_finished != self.current_state:
                self.current_state = task_finished
                logger.info('{0}% done'.format(task_finished))
                if self.verbose and task_finished > 0:
                    pbar.update(20)
            if task_remain == 0:
                break
        logger.debug('All task data cleared')
868468
def completed_task(self):
        
        # If its remote and finished running
        if self.remote_channel and self.remote_channel.exit_status_ready():
            # Collect all remaining stdout/stderr
            while self.remote_channel.recv_ready():
                self.stdout += self.remote_channel.recv(1024)
            while self.remote_channel.recv_stderr_ready():
                self.stderr += self.remote_channel.recv_stderr(1024)
            return self.remote_channel.recv_exit_status()
        # Otherwise check for finished local command
        elif self.process:
            self.stdout, self.stderr = (self._read_temp_file(self.stdout_file),
                                        self._read_temp_file(self.stderr_file))
            for temp_file in [self.stdout_file, self.stderr_file]:
                temp_file.close()
            return self.process.returncode
48006
def get_completed_task(self, task, timeout=-1):
        
        self.__wait_task_completion(task, timeout)

        return self.get(task)
456330
def complete(self):
        
        id = hashlib.sha1('%s:%s' % (self.date, self.url)).hexdigest()
        es = elasticsearch.Elasticsearch()
        try:
            es.get(index='frontpage', doc_type='html', id=id)
        except elasticsearch.NotFoundError:
            return False
        return True
803869
def get_tasks(self, status=None, offset=None, limit=None):
        
        params = {'project': self.id, 'offset': offset, 'limit': limit}
        if status:
            params['status'] = status
        return self._api.tasks.query(api=self._api, **params)
19300
def complete(self):
        
        if self.scan_limit is not None and self.scan_limit == 0:
            return True
        if self.item_limit is not None and self.item_limit == 0:
            return True
        return False
1286411
def current
      response = request(:get_all_current)
      handles = response.values.flatten.collect { |handle| Entity::Handle.build(handle) }
      initialize_items
      get_data_for_handles(handles)

      self
    end