Returns the most recent :class:`StreamingQueryProgress` update of this streaming query or
        None if there were no progress updates
        :return: a map
554994
def lastProgress(self):
        
        lastProgress = self._jsq.lastProgress()
        if lastProgress:
            return json.loads(lastProgress.json())
        else:
            return None
1246397
public synchronized Collection<Progress> getProgresses() {
    List<Progress> list = new ArrayList<>(progresses.size());
    Iterator<WeakReference<Progress>> iter = progresses.iterator();
    while(iter.hasNext()) {
      WeakReference<Progress> ref = iter.next();
      if(ref.get() == null) {
        iter.remove();
      }
      else {
        list.add(ref.get());
      }
    }
    return list;
  }
1336054
def get_for_update(self, connection_name='DEFAULT', **kwargs):

        
        if not kwargs:
            raise InvalidQueryError(
                "Can not execute a query without parameters")

        obj = self.pool.connections[connection_name].session.query(
            self._model).with_for_update(
                nowait=True, of=self._model).filter_by(**kwargs).first()
        if not obj:
            raise NotFoundError('Object not found')
        return obj
709639
def fetch_last(response: Response) -> typing.Union[str, None]:
    

    recent_paths = environ.configs.fetch('recent_paths', [])

    if len(recent_paths) < 1:
        response.fail(
            code='NO_RECENT_PROJECTS',
            message='No projects have been opened recently'
        ).console()
        return None

    return recent_paths[0]
227303
def recent(self, include=None):
        
        return self._query_zendesk(self.endpoint.recent, 'ticket', id=None, include=include)
1322302
def streams(self):
        
        from pyspark.sql.streaming import StreamingQueryManager
        return StreamingQueryManager(self._ssql_ctx.streams())
468733
private int configUpdateInProgress() {
        int retVal;

        configUpdatePendingQueueLock.writeLock().lock();
        try {
            retVal = configUpdatesInProgress;
            configUpdatesInProgress++;
        } finally {
            configUpdatePendingQueueLock.writeLock().unlock();
        }
        return retVal;
    }
1082584
async def _flowupdater(self):
        
        lastresult = set(v for v in self._savedresult if v is not None and not v.isdeleted())
        flowupdate = FlowUpdaterNotification.createMatcher(self, FlowUpdaterNotification.FLOWUPDATE)
        while True:
            currentresult = [v for v in self._savedresult if v is not None and not v.isdeleted()]
            # Calculating differences
            additems = []
            updateditems = []
            updatedset2 = self._updatedset2
            for v in currentresult:
                if v not in lastresult:
                    additems.append(v)
                else:
                    lastresult.remove(v)
                    if v in updatedset2:
                        # Updated
                        updateditems.append(v)
            removeitems = lastresult
            self._updatedset2.clear()
            # Save current result for next difference
            lastresult = set(currentresult)
            if not additems and not removeitems and not updateditems:
                await flowupdate
                continue
            await self.updateflow(self._connection, set(additems), removeitems, set(updateditems))
394726
private Future rerunUpdateAfterQueryFinishes(final Future queryFutureInProgress) {
        if (queryFutureInProgress == null) {
            throw new NullPointerException();
        }
        return getDatabase().getManager().runAsync(new Runnable() {
            @Override
            public void run() {

                if (runningState.get() == false) {
                    Log.v(Log.TAG_QUERY, "%s: rerunUpdateAfterQueryFinishes.run() fired, but running state == false.  Ignoring.", this);
                    return;
                }

                while (true) {
                    try {
                        queryFutureInProgress.get();
                    } catch (InterruptedException e) {
                        continue;
                    } catch (CancellationException e) {
                        // can safely ignore these
                    } catch (ExecutionException e) {
                        Log.e(Log.TAG_QUERY, "Got exception waiting for queryFutureInProgress to finish", e);
                    }
                    break;
                }

                if (runningState.get() == false) {
                    Log.v(Log.TAG_QUERY, "%s: queryFutureInProgress.get() done, but running state == false.", this);
                    return;
                }

                update();
            }
        });
    }
380147
def _get_progress(self):
        
        input_data = []
        ret = {}

        # traverse emerge.log from bottom up to get latest information
        last_lines = self.py3.command_output(["tail", "-50", self.emerge_log_file])
        input_data = last_lines.split("\n")
        input_data.reverse()

        for line in input_data:
            if "*** terminating." in line:
                # copy content of ret_default, not only the references
                ret = copy.deepcopy(self.ret_default)
                break
            else:
                status_re = re.compile(
                    "\((?P<cu>[\d]+) of (?P<t>[\d]+)\) "
                    "(?P<a>[a-zA-Z\/]+( [a-zA-Z]+)?) "
                    "\((?P<ca>[\w\-]+)\/(?P<p>[\w\.]+)"
                )
                res = status_re.search(line)
                if res is not None:
                    ret["action"] = res.group("a").lower()
                    ret["category"] = res.group("ca")
                    ret["current"] = res.group("cu")
                    ret["pkg"] = res.group("p")
                    ret["total"] = res.group("t")
                    break
        return ret
1357559
def updated(self):
        ''
        return dateutil.parser.parse(str(self.f.currentRevision.updated))
796491
public float progress() {
    Freezable f = UKV.get(destination_key);
    if( f instanceof Progress )
      return ((Progress) f).progress();
    return 0;
  }
344238
@Override
  public float getProgress() {
    try {
      return Math.max(Math.min(1, progressProvider.get().getProgress()), 0);
    } catch (final Exception e) {
      // An Exception must be caught and logged here because YARN swallows the Exception and fails the job.
      LOG.log(Level.WARNING, "Cannot get the application progress. Will return 0.", e);
      return 0;
    }
  }
1009141
def get_progress(self):
        
        pos = self.reader.reader.tell()
        return min((pos - self.region_start) /
                   float(self.region_end - self.region_start),
                   1.0)
359269
def query_insert(self, direction='max'):
        
        if direction == 'min':
            return Layer.objects.aggregate(
                Min('last_updated'))['last_updated__min'].strftime('%Y-%m-%dT%H:%M:%SZ')
        return self._get_repo_filter(Layer.objects).aggregate(
            Max('last_updated'))['last_updated__max'].strftime('%Y-%m-%dT%H:%M:%SZ')
291469
def update(self, incoming_stream, seek=0, size=None, chunk_size=None,
               progress_callback=None):
        """"""
        fp = self.open(mode='r+b')
        try:
            fp.seek(seek)
            bytes_written, checksum = self._write_stream(
                incoming_stream, fp, chunk_size=chunk_size,
                size=size, progress_callback=progress_callback)
        finally:
            fp.close()

        return bytes_written, checksum
1056534
def _elapsed(self):
        
        self.last_time = time.time()
        return self.last_time - self.start