Summary: | way to stop a run away report | ||
---|---|---|---|
Product: | Koha | Reporter: | Nicole C. Engard <nengard> |
Component: | Reports | Assignee: | Galen Charlton <gmcharlt> |
Status: | NEW --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | bibliwho, cslone, dcook, hc, kyle, mathsabypro |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: |
Description
Nicole C. Engard
2013-06-13 12:07:21 UTC
This is a pretty complicated process. I think it would require something likes this: a) Add a system preference "StopReports" ( or something similar ) and/or a new staff permission. b) When enabled, running a report would immediately send a partial html page with a "Stop Report" button at the top, along with the PID of the process that is generating the report. c) Clicking the "Stop Report" button would launch another script via ajax which sends the PID to a new script that does nothing but kill processes. d) The script would attempt to kill the process generating the report and send back a confirmation to the requester. e) If the processes cannot be killed, the web page would pop up an alert, if the process was killed successfully, the page would redirect back to the report that had been run. While technically it could be done, I don't think it would be a reasonable thing to do. -- That said, an interesting alternative could be to use BackgroundJobs and to have a maximum execution time allowed for a job where the worker kills its child process if it exceeds the maximum execution time. |