turbaszek commented on a change in pull request #7888:
URL: https://github.com/apache/airflow/pull/7888#discussion_r420704622



##########
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 am wondering if it would make sense to extract this tuple to something 
like `UNPICKLEABLE_EXECUTORS`? 




----------------------------------------------------------------
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:
[email protected]


Reply via email to