Sim
Well-known member
- Affected version
- 2.2b1
XF\Mvc\Renderer\Json::addDefaultJsonParams
sets parameters for jobs including a flag to indicate whether we have auto (non-blocking) run jobs to execute.I believe we should be leaving these non-blocking jobs to the
run-jobs
CLI command rather than executing them while completing the AJAX request?My recommendation is to change the line (#222 in 2.2b1):
PHP:
$autoJobs = $jobManager->hasAutoEnqueued();
to something like:
PHP:
if (!empty(\XF::options()->jobRunTrigger) && \XF::options()->jobRunTrigger == 'activity')
{
$autoJobs = $jobManager->hasAutoEnqueued();
}
else
{
$autoJobs = false;
}
... unless there is a reason why we need to have non-blocking auto jobs run during AJAX requests?