Get the next task from the raylet.

        Returns:
            A task from the raylet.
335359
def _get_next_task_from_raylet(self):
        
        with profiling.profile("worker_idle"):
            task = self.raylet_client.get_task()

        # Automatically restrict the GPUs available to this task.
        ray.utils.set_cuda_visible_devices(ray.get_gpu_ids())

        return task
1106400
def next(self):
        
        self.open_read()
        data = self.resp.read(self.BufferSize)
        if not data:
            self.close()
            raise StopIteration
        return data
1139099
def has_next_async(self):
    
    if self._fut is None:
      self._fut = self._iter.getq()
    flag = True
    try:
      yield self._fut
    except EOFError:
      flag = False
    raise tasklets.Return(flag)
4464
def next(self):
        

        try:
            self._fetch()
            pkt = self.pkt_queue.popleft()
            try:
                self._infer_acked(pkt)
            except:
                pass
            try:
                self._infer_retry(pkt)
            except:
                pass

            return pkt
        except IndexError:
            raise StopIteration()
692832
def get_next_step(self):
        
        subcategory = self.parent.step_kw_subcategory.selected_subcategory()
        if subcategory and subcategory.get('extra_keywords'):
            new_step = self.parent.step_kw_extra_keywords
        else:
            new_step = self.parent.step_kw_title
        return new_step
1218552
def get(self):
        
        if len(self.call_queue):
            return self.apply(lambda x: x).get()
        try:
            return ray.get(self.oid)
        except RayTaskError as e:
            handle_ray_task_error(e)
410276
def next(self):
        
        if self._has_finished:
            raise StopIteration

        if not len(self._buffer):
                    
            results = self.fetch_next_block()
            self._buffer.extend(results)
            
        if not len(self._buffer):
            raise StopIteration
            
        return self._buffer.popleft()
818616
def get_next_item(iterable):
    """"""
    try: x = iterable.next()
    except StopIteration: x = None
    except AttributeError: x = None
    return x
476775
def next(self):
        
        x, y = next(self.scan)
        xr = -x if self.rx else x
        yr = -y if self.ry else y
        return xr, yr
1040076
def target(self):
        
        task = yield self.task()
        if not task:
            yield defer.succeed(None)
            defer.returnValue(None)
        defer.returnValue(task.target)
1187449
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return TaskActionsInstance(
            self._version,
            payload,
            assistant_sid=self._solution['assistant_sid'],
            task_sid=self._solution['task_sid'],
        )
863610
def get_next_step(self):
        
        if self.parent.is_selected_layer_keywordless:
            # insert keyword creation thread here
            self.parent.parent_step = self
            self.parent.existing_keywords = None
            self.parent.set_mode_label_to_keywords_creation()
            new_step = self.parent.step_kw_purpose
        else:
            if layers_intersect(self.parent.exposure_layer,
                                self.parent.aggregation_layer):
                new_step = self.parent.step_fc_summary
            else:
                new_step = self.parent.step_fc_agglayer_disjoint
        return new_step
534401
def next_task(self, item, raise_exceptions=None, **kwargs):
        
        filename = os.path.basename(item)
        batch = self.get_batch(filename)
        tx_deserializer = self.tx_deserializer_cls(
            allow_self=self.allow_self, override_role=self.override_role
        )
        try:
            tx_deserializer.deserialize_transactions(
                transactions=batch.saved_transactions
            )
        except (DeserializationError, TransactionDeserializerError) as e:
            raise TransactionsFileQueueError(e) from e
        else:
            batch.close()
            self.archive(filename)
216696
def get_next_step(self, step=None):
        
        if step is None:
            step = self.steps.current
        form_list = self.get_form_list()
        key = form_list.keyOrder.index(step) + 1
        if len(form_list.keyOrder) > key:
            return form_list.keyOrder[key]
        return None
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')
823405
def next(self):
        
        while True:
            if self._source == 'CouchDB':
                raise CloudantFeedException(101)
            if self._last_seq:
                self._options.update({'since': self._last_seq})
                self._resp = None
                self._last_seq = None
            if not self._resp:
                self._start()
            if self._stop:
                raise StopIteration
            skip, data = self._process_data(next_(self._lines))
            if not skip:
                break
        return data
1192548
def get_next_step(self):
        
        if self.rbExpLayerFromCanvas.isChecked():
            new_step = self.parent.step_fc_explayer_from_canvas
        else:
            new_step = self.parent.step_fc_explayer_from_browser
        return new_step