Callback function called when a progress notification is received.

        Args:
            progress (dict): The received notification containing the progress information
350494
async def _on_progress_notification(self, progress):
        

        conn_string = progress.get('connection_string')
        done = progress.get('done_count')
        total = progress.get('total_count')
        operation = progress.get('operation')

        await self.notify_progress(conn_string, operation, done, total, wait=True)
168708
def get_progress(self):
        """"""
        progress = self.json_response.get("progress", None)
        self.logger.info("%s\t%s" % (self.request_method, self.request_url))
        return progress
423369
def get_progress(start, finish):
    
    now = datetime.now()
    dif_time_start = start - now
    dif_time_finish = finish - now

    if dif_time_start.days < 0 and dif_time_finish.days < 0:
        return PROGRESS_STATES[3][0]
    elif dif_time_start.days < 0 and dif_time_finish.days >= 1:
        return PROGRESS_STATES[2][0]
    elif dif_time_start.days >= 1 and dif_time_finish.days >= 1:
        return PROGRESS_STATES[0][0]
    else:
        return PROGRESS_STATES[2][0]
654965
def get_progress(opts, out, progress):
    '''
    
    '''
    return salt.loader.raw_mod(opts,
                                out,
                                'rawmodule',
                                mod='output')['{0}.progress_iter'.format(out)](progress)
810889
protected synchronized void notifyListenersSpiderProgress(int percentageComplete, int numberCrawled,
			int numberToCrawl) {
		for (SpiderListener l : listeners) {
			l.spiderProgress(percentageComplete, numberCrawled, numberToCrawl);
		}
	}
638278
private void onProgress(final int workerNumber, final int workerSize, final List<Long> pointerList, final float progress) {

		if (progressCache == null) {
			progressCache = new ProgressCache(workerSize, (onRealtimeResultListener != null));
		}

		progressCache.setProgress(workerNumber, progress, pointerList);

		if (onProgressListener != null) {
			onProgressListener.onProgress(progressCache.getProgress());
		}

		if (onRealtimeResultListener != null) {
			onRealtimeResultListener.onRealtimeResultListener(progressCache.getProgress(), progressCache.getResultPointers());
		}
	}
1219662
def update_progress(self, complete=False):
        
        if self.progressbar:
            try:
                self.bar.update(self.transfered)
            except Exception as e:
                logger.debug("{0}: {1}, {2} exceeds memsize {3}".format(
                                 self.remote_addr,
                                 e,
                                 self.transfered,
                                 self.max_size))
            if complete:
                self.bar.update(self.max_size)
                self.bar.finish()
        else:
            percent = int(100 * float(self.transfered) / float(self.max_size))
            # printe a message at 10%, 20%, etc...
            if percent % 10 == 0:
                if self.progress != percent:
                    logger.info("{0}: capture {1}% complete".format(
                                self.remote_addr, percent))
                    self.progress = percent
194135
def _trigger(self):
        
        self._completed.set()
        for callback in self._callbacks:
            callback(self)
974913
def _do_watch_progress(filename, sock, handler):
    """"""
    connection, client_address = sock.accept()
    data = b''
    try:
        while True:
            more_data = connection.recv(16)
            if not more_data:
                break
            data += more_data
            lines = data.split(b'\n')
            for line in lines[:-1]:
                line = line.decode()
                parts = line.split('=')
                key = parts[0] if len(parts) > 0 else None
                value = parts[1] if len(parts) > 1 else None
                handler(key, value)
            data = lines[-1]
    finally:
        connection.close()
1215026
def progress_callback(self, action, node, elapsed_time=None):
        
        if action == 'load_start':
            self.stdout.write('Loading fixture {}.{}...'.format(*node),
                              ending='')
            self.stdout.flush()
        elif action == 'load_success':
            message = 'SUCCESS'
            if elapsed_time:
                message += ' ({:.03} seconds) '.format(elapsed_time)

            self.stdout.write(message)
547676
def notify_batches_finished(self, statuses):
        
        with self._wait_condition:
            self._statuses = statuses
            self._wait_condition.notify()
772793
def progress(self, p):
        '''
        
        '''
        self.task_stack[-1] = self.task_stack[-1]._replace(progress=p)
        self.progress_report()
617546
public void updateProgress(ProgressInfo newProgress)
    {
        assert peer.equals(newProgress.peer);

        Map<String, ProgressInfo> currentFiles = newProgress.direction == ProgressInfo.Direction.IN
                                                    ? receivingFiles : sendingFiles;
        currentFiles.put(newProgress.fileName, newProgress);
    }
174051
def _progress_ret(self, progress, out):
        '''
        
        '''
        import salt.output
        # Get the progress bar
        if not hasattr(self, 'progress_bar'):
            try:
                self.progress_bar = salt.output.get_progress(self.config, out, progress)
            except Exception:
                raise LoaderError('\nWARNING: Install the `progressbar` python package. '
                                  'Requested job was still run but output cannot be displayed.\n')
        salt.output.update_progress(self.config, progress, self.progress_bar, out)
489530
def progress_bar(self, c, broker):
        
        v = broker.get(c)

        if v and isinstance(v, dict) and len(v) > 0 and 'type' in v:
            if v["type"] in self.responses:
                print(self.responses[v["type"]].color + self.responses[v["type"]].intl + Style.RESET_ALL, end="", file=self.stream)
            else:
                print(".", end="", file=self.stream)
        elif c in broker.exceptions:
            self.counts['exception'] += len(broker.exceptions[c])
            print(Fore.RED + "E" + Style.RESET_ALL, end="", file=self.stream)
        return self
702187
def report_progress(self):
        """"""
        percent = self.calc_percent()
        total = format_bytes(self._total)

        speed = self.calc_speed()
        total_speed_report = '{0} at {1}'.format(total, speed)

        report = '\r{0: <56} {1: >30}'.format(percent, total_speed_report)

        if self._finished:
            print(report)
        else:
            print(report, end="")
        sys.stdout.flush()
939554
def _run_progress_callbacks(self, bytes_transferred):
        '''  '''
        if bytes_transferred:
            for callback in self._progress_callbacks:
                try:
                    callback(bytes_transferred=bytes_transferred)
                except Exception as ex:
                    logger.error("Exception: %s" % str(ex))