When first trying to use dask_jobqueue, I was used to using LocalCluster from distributed where **kwargs is really **worker_kwargs and was confused why some options were making it through to the worker but others were not like lifetime. Stepping through the code, I saw that **kwargs for JobCluster were propagated to the options key of the worker argument to SpecCluster and then on to the **kwargs of dask_jobqueue.core.Job where it was ignored. I wonder if lifetime, lifetime-stagger, and lifetime-restart should be handled by dask_jobqueue.core.Job like other command_args are?
Also, I wonder if there should be a warning for any unhandled **kwargs that make it to dask_jobqueue.core.Job, since the user (like me) is probably confused if they are sending arguments that are making it that far down (I don't think arguments can make it that far in **kwargs unless they were not used higher up?). The thing that it took me a while to realize was that the dask_jobqueue.core.Job subclasses kind of are the dask Worker as far as JobCluster is concerned. Renaming extra to dask_worker_additional_args as suggested in #323 would help some with this confusion.
When first trying to use dask_jobqueue, I was used to using
LocalClusterfrom distributed where**kwargsis really**worker_kwargsand was confused why some options were making it through to the worker but others were not likelifetime. Stepping through the code, I saw that**kwargsforJobClusterwere propagated to theoptionskey of theworkerargument toSpecClusterand then on to the**kwargsofdask_jobqueue.core.Jobwhere it was ignored. I wonder iflifetime,lifetime-stagger, andlifetime-restartshould be handled bydask_jobqueue.core.Joblike other command_args are?Also, I wonder if there should be a warning for any unhandled
**kwargsthat make it todask_jobqueue.core.Job, since the user (like me) is probably confused if they are sending arguments that are making it that far down (I don't think arguments can make it that far in**kwargsunless they were not used higher up?). The thing that it took me a while to realize was that thedask_jobqueue.core.Jobsubclasses kind of are the dask Worker as far as JobCluster is concerned. Renamingextratodask_worker_additional_argsas suggested in #323 would help some with this confusion.