You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airflow.apache.org by Сёмочкин Максим Викторович <mv...@mts.ru> on 2017/09/13 14:24:24 UTC

Restart scheduler

Hi,
We make the decision to start using Local executor for some our tasks. Can anybody give me advice about how to it can be gracefully shutdowned?
I don’t want to re-invent the wheel.
Of course I have an option to realize the script which can scan database and wait until the all active tasks will be finished,  but may be someone has a solved this problem already or may be the Local executor has this functionality out of the box.
Thanks

______________________________
IP: 11589
mob: +79150634897
e-mail: mvsyomo1@mts.ru<ma...@mts.ru>
г. Москва, ул. Воронцовская, д. 1/3, стр. 2, 4-5 этаж, 401 OS
[cid:image001.gif@01D32CB5.24884750]

Re: Restart scheduler

Posted by Bolke de Bruin <bd...@gmail.com>.
The LocalExecutor if SIGTERMed or started with “num_runs” will finish all running tasks, before it shuts down. This due to the fact the LocalExecutor runs in process with the scheduler. It can thus take a while before the scheduler shutdown if you have any long running tasks.

Please note that using “num_runs” is deprecated.

Bolke

> On 13 Sep 2017, at 16:24, Сёмочкин Максим Викторович <mv...@mts.ru> wrote:
> 
> Hi,
> We make the decision to start using Local executor for some our tasks. Can anybody give me advice about how to it can be gracefully shutdowned?
> I don’t want to re-invent the wheel.
> Of course I have an option to realize the script which can scan database and wait until the all active tasks will be finished,  but may be someone has a solved this problem already or may be the Local executor has this functionality out of the box.
> Thanks
>  
> ______________________________
> IP: 11589
> mob: +79150634897
> e-mail: mvsyomo1@mts.ru <ma...@mts.ru>
> г. Москва, ул. Воронцовская, д. 1/3, стр. 2, 4-5 этаж, 401 OS
>