Yield out the results found on the markers for the context task ids.
979177
def iter_context_results(context, batch_size=10, task_cache=None):
    """"""

    for futures in iget_batches(context.task_ids, batch_size=batch_size):
        for key, future in futures:
            task = future.get_result()

            if task_cache is not None:
                task_cache[key.id()] = task

            yield key.id(), task
131291
def run(self):
        
        self._runtime_initialize()

        if len(self._flattened_nodes) == 0:
            logger.warning("WARNING: Nothing to do. Try checking your model "
                           "configs and model specification args")
            return []
        else:
            logger.info("")

        selected_uids = frozenset(n.unique_id for n in self._flattened_nodes)
        result = self.execute_with_hooks(selected_uids)

        result.write(self.result_path())

        self.task_end_messages(result.results)
        return result.results
529929
def iter_shortcuts():
    """"""
    for context_name, keystr in CONF.items('shortcuts'):
        context, name = context_name.split("/", 1)
        yield context, name, keystr
974529
def gen_tasks(self, urls):
        
        tasks = []
        if isinstance(urls, list):
            for url in urls:
                dat = {
                    'url': url,
                    'name': url.split('/')[-1]
                }
                if not self.overwrite and helper.is_file_ok(dat['name']):
                    self.result['skip'] += 1
                else:
                    tasks.append(dat)
        elif isinstance(urls, dict):
            # {k: v} => k is name, v is url value
            for k, v in urls.items():
                dat = {
                    'url': v,
                    'name': k,
                }
                if not self.overwrite and helper.is_file_ok(dat['name']):
                    self.result['skip'] += 1
                else:
                    tasks.append(dat)
        else:
            raise CrawlerParamsError('urls should be list/dict')
        return tasks
1138778
def get_outputs(self):
    
    assert self.SUCCESS == self.get_status()
    ss = model.ShardState.find_all_by_mapreduce_state(self._state)
    for s in ss:
      yield iter(s.writer_state.get("outs", []))
161771
async def result_processor(tasks):
    """"""
    output = {}
    for task in tasks:
        num, res = await task
        output[num] = res
    return output
779767
def each
      process(@initial_result).each { |doc| yield doc }
      while more?
        return kill_cursors if exhausted?
        get_more.each { |doc| yield doc }
      end
    end
958657
def get_task_results(self):
        

        results = self.get_task_results_without_format()
        if options.tunnel.string_as_binary:
            return compat.OrderedDict([(k, bytes(result)) for k, result in six.iteritems(results)])
        else:
            return compat.OrderedDict([(k, str(result)) for k, result in six.iteritems(results)])
347403
def results(context, history_log):
    """"""
    if context.obj is None:
        context.obj = {}
    context.obj['history_log'] = history_log

    if context.invoked_subcommand is None:
        context.invoke(show, item=1)
159727
public List<TaskMonitor> getTaskMonitors(RuntimeContext context) {
        return getTaskMonitors().stream().filter(monitor ->
            monitor.isEnabled(context)
        ).collect(Collectors.toList());
    }
1153786
protected void obtainFindBugsMarkers() {
        // Delete old markers
        markers.clear();
        if (editor == null || ruler == null) {
            return;
        }

        // Obtain all markers in the editor
        IResource resource = (IResource) editor.getEditorInput().getAdapter(IFile.class);
        if(resource == null){
            return;
        }
        IMarker[] allMarkers = MarkerUtil.getMarkers(resource, IResource.DEPTH_ZERO);
        if(allMarkers.length == 0) {
            return;
        }
        // Discover relevant markers, i.e. FindBugsMarkers
        AbstractMarkerAnnotationModel model = getModel();
        IDocument document = getDocument();
        for (int i = 0; i < allMarkers.length; i++) {
            if (includesRulerLine(model.getMarkerPosition(allMarkers[i]), document)) {
                if (MarkerUtil.isFindBugsMarker(allMarkers[i])) {
                    markers.add(allMarkers[i]);
                }
            }
        }
    }
1327510
def execute_tasks(self):
        
        for t in self.tasks:
            print('RUNNING ' + str(t.task_id) + ' = ' + t.name)
            t.execute()
            if t.success != '__IGNORE__RESULT__':
                print(t)
                print('TASK RESULT :', t.result, ' but success = ' , t.success )
                if t.result != t.success:
                    #raise Exception('Project execution failed at task ' + str(t.task_id) + ' = ' + t.name)
                    print('ABORTING TASK EXECUTION SEQUENCE'  + str(t.task_id) + ' = ' + t.name)
                    break
714542
def submit_all(self):
        
        for args in self.task_args:
            self.submit(*args)
        return self.get_results()
571091
def contexts(self):
        
        result = set()
        for todo in self._todos:
            contexts = todo.contexts()
            result = result.union(contexts)

        return result
1225970
def on_result(self, task, result):
        ''''''
        if not result:
            return
        if 'taskid' in task and 'project' in task and 'url' in task:
            logger.info('result %s:%s %s -> %.30r' % (
                task['project'], task['taskid'], task['url'], result))
            return self.resultdb.save(
                project=task['project'],
                taskid=task['taskid'],
                url=task['url'],
                result=result
            )
        else:
            logger.warning('result UNKNOW -> %.30r' % result)
            return
848386
def _get_future_tasks(self):
        """"""

        self.alerts = {}
        now = std_now()

        for task in objectmodels['task'].find({'alert_time': {'$gt': now}}):
            self.alerts[task.alert_time] = task

        self.log('Found', len(self.alerts), 'future tasks')
502030
private void processResourceAssignments(Task task, List<MapRow> assignments)
   {
      for (MapRow row : assignments)
      {
         processResourceAssignment(task, row);
      }
   }