/usr/lib/rads/venv/lib/python3.13/site-packages/s3transfer/__pycache__
Edit: /usr/lib/rads/venv/lib/python3.13/site-packages/s3transfer/__pycache__/tasks.cpython-313.pyc (13711B)
j.@ S SK r S SKrS SKJr S SKJr \R " \
5 r " S S5 r " S S\5 r
" S S
\5 r " S S\5 rg! \ a S SKJr NLf = f)
N)
get_callbacks)start_as_current_context)nullcontextc z \ rS rSrSr SS jrS r\S 5 rS r S r
SS jrS
rS r
S rS
rS rS rSrg)Task zA task associated to a TransferFuture request
This is a base class for other classes to subclass from. All subclassed
classes must implement the main() method.
Nc Xl X l U R c 0 U l X0l Uc 0 U l X@l U R c / U l XPl g)a
:type transfer_coordinator: s3transfer.futures.TransferCoordinator
:param transfer_coordinator: The context associated to the
TransferFuture for which this Task is associated with.
:type main_kwargs: dict
:param main_kwargs: The keyword args that can be immediately supplied
to the _main() method of the task
:type pending_main_kwargs: dict
:param pending_main_kwargs: The keyword args that are depended upon
by the result from a dependent future(s). The result returned by
the future(s) will be used as the value for the keyword argument
when _main() is called. The values for each key can be:
* a single future - Once completed, its value will be the
result of that single future
* a list of futures - Once all of the futures complete, the
value used will be a list of each completed future result
value in order of when they were originally supplied.
:type done_callbacks: list of callbacks
:param done_callbacks: A list of callbacks to call once the task is
done completing. Each callback will be called with no arguments
and will be called no matter if the task succeeds or an exception
is raised.
:type is_final: boolean
:param is_final: True, to indicate that this task is the final task
for the TransferFuture request. By setting this value to True, it
will set the result of the entire TransferFuture to the result
returned by this task's main() method.
N)_transfer_coordinator_main_kwargs_pending_main_kwargs_done_callbacks _is_final)selftransfer_coordinatormain_kwargspending_main_kwargsdone_callbacksis_finals C/usr/lib/rads/venv/lib/python3.13/site-packages/s3transfer/tasks.py__init__
Task.__init__" sX P &:"'$ "D$7!&(*D%-'#%D ! c / SQnU R U R U5 nU R R SU R R
SU S3$ )N)bucketkeypart_numberfinal_filenametransfer_futureoffset
extra_argsz
(transfer_id=z, ))"_get_kwargs_with_params_to_includer __class____name__r
transfer_id)r params_to_displaymain_kwargs_to_displays r __repr__
Task.__repr__Z s`
"&!H!H0"
..))*-8R8R8^8^7__abxayyz{{r c . U R R $ )z8The id for the transfer request that the task belongs to)r
r% )r s r r% Task.transfer_idk s ))555r c 6 0 nU H nXA; d M
X X4' M U$ N )r kwargsincludefiltered_kwargsparams r r" 'Task._get_kwargs_with_params_to_includep s( E)/& r c R 0 nUR 5 H u pEXB; a M XSU' M U$ r- )items)r r/ excluder1 r2 values r "_get_kwargs_with_params_to_exclude'Task._get_kwargs_with_params_to_excludew s2 "LLNLE%*E" + r c [ U5 U R 5 U R 5 nU R R 5 ( d_ U R U5 U R H
nU" 5 M U R ( a U R R 5 sSSS5 $ U R H
nU" 5 M U R ( a U R R 5 SSS5 g! [ a nU R U5 SnANnSnAff = f! U R H
nU" 5 M U R ( a U R R 5 f f = f! , ( d f g= f)z9The callable to use when submitting a Task to an executorN)r _wait_on_dependent_futures_get_all_main_kwargsr
done
_execute_mainr
r
announce_done Exception_log_and_set_exception)r ctxr/
done_callbackes r __call__
Task.__call__ s3
%c
*
?//1
224 116688--f5
&*%9%9M!O &: >> ..<<>1 +
* 9 &*%9%9M!O &: >> ..<<>1 +
*
/++A..
/ &*%9%9M!O &: >> ..<<> "+ +
*sP E.AC;AE.,D#-AE.;
D DD#D D##AE++E..
E<c S/nU R X5 n[ R SU SU 35 U R " S0 UD6nU R ( a U R
R
U5 U$ )NdatazExecuting task z
with kwargs r. )r8 loggerdebug_mainr r
set_result)r r/ params_to_excludekwargs_to_displayreturn_values r r> Task._execute_main sq $H CC
tfM:K9LMNzz+F+ >>&&11,?r c b [ R SSS9 U R R U5 g )NzException raised.T)exc_info)rI rJ r
set_exception)r exceptions r rA Task._log_and_set_exception s) (48""00;r c [ S5 e)zThe method that will be ran in the executor
This method must be implemented by subclasses from Task. main() can
be implemented with any arguments decided upon by the subclass.
z_main() must be implementedNotImplementedError)r r/ s r rK
Task._main s ""?@@r c / nU R R 5 H> u p#[ U[ 5 ( a UR U5 M- UR U5 M@ U R
U5 g r- )r r5
isinstancelistextendappend_wait_until_all_complete)r futures_to_wait_on_futures r r; Task._wait_on_dependent_futures s_ 2288:IA&$''"))&1 #))&1
;
%%&89r c [ R SX5 U H* n [ R SX5 UR 5 M, [ R SU 5 g ! [ a MR f = f)Nz-%s about to wait for the following futures %sz%s about to wait for %sz%%s done waiting for dependent futures)rI rJ resultr@ )r futuresrb s r r_ Task._wait_until_all_complete se ;T
F
6E