-
Type: Bug Report
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 5.0.0
-
Fix Version/s: 5.2.0
-
Component/s: Scheduled Tasks
-
Labels:None
-
External issue URL:
-
Change Log Message:Fixing page load delay because of long running scheduled task
-
Story Points:1
-
External issue ID:1339
-
Copy Issue Key:
-
Patch Instructions:
Administrator can set scheduled tasks to be executed:
- in cron;
- after page load.
In later case long running scheduled task delays actual page content from being sent to user, who requested a page.
To solve this we need to place following code after page content has been sent to user (but before scheduled task execution is started):
ignore_user_abort(true);
while ( ob_get_level() )
{ ob_end_clean(); }header('Connection: close');
// header('Content-Length: 0'); // only uncomment when such header isn't sent already
flush();
This code will do following:
1. web browser "Loading ..." indicator should show 100%
2. connection to webserver will be terminated
3. reset of the script will continue to execute on the server
- parent of
-
INP-1117 Enable output compression by default
- Closed
-
INP-1139 Flush output buffer only, when it's present
- Closed
- relates to
-
INP-968 Remove RunMode from Scheduled Tasks
- Closed
-
INP-794 Rename Agents section to "Scheduled Tasks"
- Closed
-
INP-1102 Don't use session in Scheduled Tasks
- Closed
-
INP-1103 Create cron-like interface for scheduled tasks
- Closed