sfirke commented on code in PR #36987:
URL: https://github.com/apache/superset/pull/36987#discussion_r2718886771
##########
superset/reports/api.py:
##########
@@ -460,6 +465,38 @@ def put(self, pk: int) -> Response:
)
return self.response_422(message=str(ex))
+ @expose("/<int:pk>/run_now", methods=("POST",))
+ @protect()
+ @safe
+ def run_now(self, pk) -> Response:
+ """
+ Run a report immediately, bypassing the schedule.
+ ---
+ post:
+ description: Run a report immediately
+ parameters:
+ - in: path
+ name: pk
+ schema:
+ type: integer
+ required: true
+ description: ReportSchedule primary key
+ responses:
+ 200:
+ description: Report triggered
+ 500:
+ description: Failed to run report
+ """
+ # Use a random UUID for the execution id
+ execution_id = str(uuid4())
+ # Use current time as scheduled_dttm
+ scheduled_dttm = datetime.utcnow()
Review Comment:
@isaac-jaynes-imperva what do you think of this suggestion from the bot?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]