mik-laj commented on a change in pull request #7888:
URL: https://github.com/apache/airflow/pull/7888#discussion_r420738216



##########
File path: airflow/jobs/backfill_job.py
##########
@@ -773,13 +774,9 @@ def _execute(self, session=None):
         # picklin'
         pickle_id = None
 
-        try:
-            from airflow.executors.dask_executor import DaskExecutor
-        except ImportError:
-            DaskExecutor = None
-
-        if not self.donot_pickle and \
-                self.executor.__class__ not in (LocalExecutor, 
SequentialExecutor, DaskExecutor):
+        if not self.donot_pickle and self.executor_class not in (
+            ExecutorLoader.LOCAL_EXECUTOR, ExecutorLoader.SEQUENTIAL_EXECUTOR, 
ExecutorLoader.DASK_EXECUTOR,
+        ):

Review comment:
       I think it would be worth doing as an attribute in the performer so that 
custom executors can also affect this behavior, but that would require changes 
to all executors. I'll create a ticket about that.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to