ArtinSarraf opened a new issue #16739: URL: https://github.com/apache/airflow/issues/16739
Currently airflow's DaskExecutor does not support specifying queues for tasks, due to dask's lack of an explicit queue specification feature. However, this can be reliably mimicked using dask resources ([details here](https://distributed.dask.org/en/latest/resources.html)). So the set up would look something like this: ``` # starting dask worker that can service airflow tasks submitted with queue=queue_name_1 or queue_name_2 $ dask-worker <address> --resources "queue_name_1=9999999, queue_name_2=9999999" ``` Unfortunately as far as I know you need to provide a finite resource limit for the workers, so you'd need to provide a large limit, but I think it's worth the minor inconvenience to allow a queue functionality in the dask executor. ``` # airflow/executors/dask_executor.py def execute_async( self, key: TaskInstanceKey, command: CommandType, queue: Optional[str] = None, executor_config: Optional[Any] = None, ) -> None: self.validate_command(command) def airflow_run(): return subprocess.check_call(command, close_fds=True) if not self.client: raise AirflowException(NOT_STARTED_MESSAGE) ################ change made here ################# resources = None if queue: resources = {queue: 1} future = self.client.submit(airflow_run, pure=False, resources=resources) self.futures[future] = key # type: ignore ``` -- 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]
