ferruzzi commented on code in PR #62984:
URL: https://github.com/apache/airflow/pull/62984#discussion_r3114172659
##########
providers/amazon/src/airflow/providers/amazon/aws/executors/batch/batch_executor.py:
##########
@@ -124,29 +134,48 @@ def __init__(self, *args, **kwargs):
fallback=CONFIG_DEFAULTS[AllBatchConfigKeys.MAX_SUBMIT_JOB_ATTEMPTS],
)
- def queue_workload(self, workload: workloads.All, session: Session | None)
-> None:
+ def queue_workload(self, workload: WorkloadTypes, session: Session | None)
-> None:
Review Comment:
My mistake, sorry. We can't do that until min_ver hits 3.2. Let's go with
one standard replacement across all of these though. Try this:
```python
def queue_workload(self, workload: workloads.All, session: Session | None)
-> None:
from airflow.executors import workloads
if isinstance(workload, workloads.ExecuteTask):
self.queued_tasks[workload.ti.key] = workload
return
if AIRFLOW_V_3_3_PLUS and isinstance(workload,
workloads.ExecuteCallback):
self.queued_callbacks[workload.callback.key] = workload
return
raise RuntimeError(f"{type(self)} cannot handle workloads of type
{type(workload)}")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]