(self, call_args)
| 560 | return transfer_future |
| 561 | |
| 562 | def _get_future_with_components(self, call_args): |
| 563 | transfer_id = self._id_counter |
| 564 | # Creates a new transfer future along with its components |
| 565 | transfer_coordinator = TransferCoordinator(transfer_id=transfer_id) |
| 566 | # Track the transfer coordinator for transfers to manage. |
| 567 | self._coordinator_controller.add_transfer_coordinator( |
| 568 | transfer_coordinator |
| 569 | ) |
| 570 | # Also make sure that the transfer coordinator is removed once |
| 571 | # the transfer completes so it does not stick around in memory. |
| 572 | transfer_coordinator.add_done_callback( |
| 573 | self._coordinator_controller.remove_transfer_coordinator, |
| 574 | transfer_coordinator, |
| 575 | ) |
| 576 | components = { |
| 577 | 'meta': TransferMeta(call_args, transfer_id=transfer_id), |
| 578 | 'coordinator': transfer_coordinator, |
| 579 | } |
| 580 | transfer_future = TransferFuture(**components) |
| 581 | return transfer_future, components |
| 582 | |
| 583 | def _get_submission_task_main_kwargs( |
| 584 | self, transfer_future, extra_main_kwargs |
no test coverage detected