airflow-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ash Berlin-Taylor <ash_airflowl...@firemirror.com>
Subject Re: Terminate task process through UI
Date Fri, 08 Sep 2017 08:49:49 GMT
That sets the task instance state to SHUTDOWN, which is then picked up by the task sentinel
here https://github.com/apache/incubator-airflow/blob/b2e1753f5b74ad1b6e0889f7b784ce69623c95ce/airflow/jobs.py#L164-L165
<https://github.com/apache/incubator-airflow/blob/b2e1753f5b74ad1b6e0889f7b784ce69623c95ce/airflow/jobs.py#L164-L165>
which triggers kill, so it is meant to work.

-ash

> On 7 Sep 2017, at 20:00, Richard Baron Penman <richard.penman@gmail.com> wrote:
> 
> Is this known to work?
> I tried clearing and the on_kill() method wasn't triggered.
> 
> As far as I can tell the clearing is performed by the
> clear_task_instances() function, which changes the task status but does not
> kill the process:
> https://github.com/apache/incubator-airflow/blob/b2e1753f5b74ad1b6e0889f7b784ce69623c95ce/airflow/models.py#L120
> 
> 
> 
> On Thu, Sep 7, 2017 at 4:46 AM, Maxime Beauchemin <
> maximebeauchemin@gmail.com> wrote:
> 
>> "Clearing" a running task instance either through the UI or through the CLI
>> should trigger on_kill.
>> 
>> Max
>> 
>> On Wed, Sep 6, 2017 at 11:45 AM, Richard Baron Penman <richardbp@gmail.com
>>> 
>> wrote:
>> 
>>> Hello,
>>> 
>>> Is there a way to trigger the on_kill() method of an operator through the
>>> UI?
>>> I tried changing the state of a running task and deleting it, but neither
>>> approach triggered the on_kill() method and so the process was still
>>> running.
>>> 
>>> Similar question was asked on SO:
>>> https://stackoverflow.com/questions/43626844/kill-the-
>>> airflow-task-running-on-a-remote-location-through-airflow-ui
>>> 
>>> Richard
>>> 
>> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message