ashb commented on a change in pull request #6380: [AIRFLOW-3632] Allow 
replace_microseconds in trigger_dag REST reqeust
URL: https://github.com/apache/airflow/pull/6380#discussion_r337236009
 
 

 ##########
 File path: airflow/www/api/experimental/endpoints.py
 ##########
 @@ -74,8 +75,12 @@ def trigger_dag(dag_id):
 
             return response
 
+    replace_microseconds = True
+    if 'replace_microseconds' in data:
+        replace_microseconds = to_boolean(data['replace_microseconds'])
+
     try:
-        dr = trigger.trigger_dag(dag_id, run_id, conf, execution_date)
+        dr = trigger.trigger_dag(dag_id, run_id, conf, execution_date, 
replace_microseconds)
 
 Review comment:
   This would fit the goal, but I feel there is a better way of expressing this.
   
   If you follow all the code through I think what we should do is: if an 
explicit timestamp is passed in, we should use that exactly. If one is not 
passed then the current default of "generate the execution date from now(), but 
truncate it to nearest whole seconds" come in to play.
   
   I think that would lead to a clearer to understand API.
   
   WDYT?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to