|
160 | 160 | """ # Documentation for params used by both HTEx and MPIEx
|
161 | 161 |
|
162 | 162 |
|
| 163 | +class HTEXFuture(Future): |
| 164 | + def __init__(self, task_id) -> None: |
| 165 | + super().__init__() |
| 166 | + self.parsl_executor_task_id = task_id |
| 167 | + |
| 168 | + |
163 | 169 | class HighThroughputExecutor(BlockProviderExecutor, RepresentationMixin, UsageInformation):
|
164 | 170 | __doc__ = f"""Executor designed for cluster-scale
|
165 | 171 |
|
@@ -670,7 +676,7 @@ def _hold_block(self, block_id):
|
670 | 676 | logger.debug("Sending hold to manager: {}".format(manager['manager']))
|
671 | 677 | self._hold_manager(manager['manager'])
|
672 | 678 |
|
673 |
| - def submit(self, func, resource_specification, *args, **kwargs): |
| 679 | + def submit(self, func: Callable, resource_specification: dict, *args, **kwargs) -> HTEXFuture: |
674 | 680 | """Submits work to the outgoing_q.
|
675 | 681 |
|
676 | 682 | The outgoing_q is an external process listens on this
|
@@ -702,8 +708,7 @@ def submit(self, func, resource_specification, *args, **kwargs):
|
702 | 708 | args_to_print = tuple([ar if len(ar := repr(arg)) < 100 else (ar[:100] + '...') for arg in args])
|
703 | 709 | logger.debug("Pushing function {} to queue with args {}".format(func, args_to_print))
|
704 | 710 |
|
705 |
| - fut = Future() |
706 |
| - fut.parsl_executor_task_id = task_id |
| 711 | + fut = HTEXFuture(task_id) |
707 | 712 | self.tasks[task_id] = fut
|
708 | 713 |
|
709 | 714 | try:
|
|
0 commit comments