You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2018/12/15 19:05:14 UTC

[GitHub] ashb edited a comment on issue #3596: [AIRFLOW-2747] Explicit re-schedule of sensors

ashb edited a comment on issue #3596: [AIRFLOW-2747] Explicit re-schedule of sensors
URL: https://github.com/apache/incubator-airflow/pull/3596#issuecomment-447590657
 
 
   I think this feature needs some work 
   
   1. the tasks that are in "reschedule" just show up as "None" in the tree view:
     ![screen shot 2018-12-15 at 18 59 07](https://user-images.githubusercontent.com/34150/50046454-8868a100-009b-11e9-8468-4e4fbae371b1.png)
   
     This makes it hard-to-impossible to know what is going on and they probably need to show up as a new state, or just make them show up as running, queued or something? Showing as None isn't helpful. (I even knew what was going on and was still confused!
   
   2. The scheduler (when using SequentialExecutor, but that isn't relevant) logs this task as Success!
   
      ```
      [2018-12-15 18:59:13,635] {jobs.py:1100} INFO - 1 tasks up for execution:
           <TaskInstance: hello_world.wait 2018-12-15 18:50:00+00:00 [scheduled]>
      [2018-12-15 18:59:13,649] {jobs.py:1135} INFO - Figuring out tasks to run in Pool(name=None) with 128 open slots and 1 task instances in queue
      [2018-12-15 18:59:13,656] {jobs.py:1171} INFO - DAG hello_world has 0/16 running and queued tasks
      [2018-12-15 18:59:13,656] {jobs.py:1209} INFO - Setting the follow tasks to queued state:
           <TaskInstance: hello_world.wait 2018-12-15 18:50:00+00:00 [scheduled]>
      [2018-12-15 18:59:13,698] {jobs.py:1293} INFO - Setting the following 1 tasks to queued state:
           <TaskInstance: hello_world.wait 2018-12-15 18:50:00+00:00 [queued]>
      [2018-12-15 18:59:13,699] {jobs.py:1335} INFO - Sending ('hello_world', 'wait', datetime.datetime(2018, 12, 15, 18, 50, tzinfo=<Timezone [UTC]>), 1) to executor with priority 2 and queue default
      [2018-12-15 18:59:13,701] {base_executor.py:56} INFO - Adding to queue: airflow run hello_world wait 2018-12-15T18:50:00+00:00 --local -sd /Users/ash/airflow/dags/foo.py
      [2018-12-15 18:59:13,742] {sequential_executor.py:45} INFO - Executing command: airflow run hello_world wait 2018-12-15T18:50:00+00:00 --local -sd /Users/ash/airflow/dags/foo.py
      [2018-12-15 18:59:15,558] {__init__.py:51} INFO - Using executor SequentialExecutor
      [2018-12-15 18:59:15,755] {models.py:273} INFO - Filling up the DagBag from /Users/ash/airflow/dags/foo.py
      [2018-12-15 18:59:15,833] {cli.py:530} INFO - Running <TaskInstance: hello_world.wait 2018-12-15T18:50:00+00:00 [queued]> on host themisto.localdomain
      [2018-12-15 18:59:21,427] {jobs.py:1439} INFO - Executor reports hello_world.wait execution_date=2018-12-15 18:50:00+00:00 as success for try_number 1
       ```
   
   
   The dag I was testing this with as:
   
   ```
   from airflow import DAG
   import datetime
   import airflow
   from airflow.operators.dummy_operator import DummyOperator
   from airflow.sensors.time_sensor import TimeSensor
   
   start = (
       airflow.utils.dates.days_ago(2)
   )
   
   dag2 = DAG('hello_world',
              schedule_interval='*/5 * * * *',
              start_date=start,
              catchup=False)
   
   with dag2:
       (
           TimeSensor(
               task_id='wait',
               target_time=datetime.time(20),
               mode='reschedule',
           ) >>
           DummyOperator(task_id='dummy')
       )
   ```
   
   @seelmann Are you able to work on fixing these two issues?
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services