Display errors and OK message in webcron result page

This commit is contained in:
Kijin Sung 2024-10-26 16:50:14 +09:00
parent e8c03318e4
commit 4ebaa6b0cb
5 changed files with 34 additions and 1 deletions

View file

@ -33,6 +33,7 @@ else
}
// Get queue configuration set by the administrator.
$display_errors = config('queue.display_errors') === false ? false : true;
$timeout = (config('queue.interval') ?? 1) * 60;
$process_count = config('queue.process_count') ?? 1;
@ -41,6 +42,10 @@ if (PHP_SAPI !== 'cli')
{
ignore_user_abort(true);
set_time_limit(max(60, $timeout));
if ($display_errors)
{
ini_set('display_errors', true);
}
if (Rhymix\Framework\Session::checkStart())
{
Rhymix\Framework\Session::close();
@ -93,3 +98,9 @@ else
{
Rhymix\Framework\Queue::process($timeout);
}
// If called over the network, display a simple OK message to indicate success.
if (PHP_SAPI !== 'cli')
{
echo "OK\n";
}