etr2460 commented on a change in pull request #10506:
URL: 
https://github.com/apache/incubator-superset/pull/10506#discussion_r464523711



##########
File path: superset/tasks/schedules.py
##########
@@ -551,10 +552,17 @@ def schedule_alert_query(  # pylint: 
disable=unused-argument
 
     if report_type == ScheduleType.alert:
         if is_test_alert and recipients:
-            deliver_alert(schedule, recipients)
+            deliver_alert(schedule.id, schedule.slice.id, schedule.label, 
recipients)
             return
 
-        if run_alert_query(schedule):
+        if run_alert_query(
+            schedule.id,

Review comment:
       Instead of passing in every param needed from schedule, maybe it's 
cleaner to only pass in the schedule id, then you can get the schedule object 
within the function and reference all the params there.
   
   




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to