Dashboard
PHP:
8.2.30
OS:
Linux
User:
dh_nv8b2m
/
/
usr
/
lib
/
python3
/
dist-packages
/
s3transfer
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: upload.cpython-310.pyc
o �y�`�s � @ s d dl Z d dlmZ d dlmZmZ d dlmZ d dlm Z d dlm Z d dlmZ d dlmZ d d l mZ d d l mZ d dl mZmZ G dd � d e�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de �ZG dd� de �ZG dd� de �ZdS )� N)�six)�seekable�readable)�IN_MEMORY_UPLOAD_TAG)�Task)�SubmissionTask)�CreateMultipartUploadTask)�CompleteMultipartUploadTask)� get_callbacks)�get_filtered_dict)�DeferredOpenFile�ChunksizeAdjusterc @ s. e Zd Zddd�Zdd� Zdd� Zdd � Zd S )�AggregatedProgressCallback� c C s || _ || _d| _dS )a� Aggregates progress updates for every provided progress callback :type callbacks: A list of functions that accepts bytes_transferred as a single argument :param callbacks: The callbacks to invoke when threshold is reached :type threshold: int :param threshold: The progress threshold in which to take the aggregated progress and invoke the progress callback with that aggregated progress total r N)� _callbacks� _threshold�_bytes_seen)�self� callbacks� threshold� r �3/usr/lib/python3/dist-packages/s3transfer/upload.py�__init__ s z#AggregatedProgressCallback.__init__c C s* | j |7 _ | j | jkr| �� d S d S �N)r r �_trigger_callbacks)r �bytes_transferredr r r �__call__- s �z#AggregatedProgressCallback.__call__c C s | j dkr| �� dS dS )z@Flushes out any progress that has not been sent to its callbacksr N)r r �r r r r �flush2 s �z AggregatedProgressCallback.flushc C s"