This commit is contained in:
Roman Kelesidis 2023-09-27 23:16:09 +07:00
parent 46375234d7
commit 71b3505dcd
4 changed files with 8 additions and 11 deletions

View File

@ -13,7 +13,7 @@ function cron_get_file_lock ()
{
# bb_log(date('H:i:s - ') . getmypid() .' -x-- FILE-LOCK try'. LOG_LF, CRON_LOG_DIR .'cron_check');
$lock_obtained = rename(CRON_ALLOWED, CRON_RUNNING);
$lock_obtained = @rename(CRON_ALLOWED, CRON_RUNNING);
}
elseif (file_exists(CRON_RUNNING))
{
@ -22,7 +22,7 @@ function cron_get_file_lock ()
elseif (!file_exists(CRON_ALLOWED) && !file_exists(CRON_RUNNING))
{
file_write('', CRON_ALLOWED);
$lock_obtained = rename(CRON_ALLOWED, CRON_RUNNING);
$lock_obtained = @rename(CRON_ALLOWED, CRON_RUNNING);
}
return $lock_obtained;
@ -30,10 +30,7 @@ function cron_get_file_lock ()
function cron_track_running ($mode)
{
if (!defined('CRON_STARTMARK'))
{
define('CRON_STARTMARK', TRIGGERS_DIR . 'cron_started_at_' . date('Y-m-d_H-i-s') . '_by_pid_' . getmypid());
}
@define('CRON_STARTMARK', TRIGGERS_DIR .'cron_started_at_'. date('Y-m-d_H-i-s') .'_by_pid_'. getmypid());
if ($mode == 'start')
{

View File

@ -29,11 +29,11 @@ function get_sql_log ()
if (!empty($datastore->db->dbg))
{
$log .= get_sql_log_html($datastore->db, "cache: datastore [{$datastore->db->engine}]");
$log .= get_sql_log_html($datastore->db, 'cache: datastore ['.$datastore->db->engine.']');
}
else if(!empty($datastore->dbg))
{
$log .= get_sql_log_html($datastore, "cache: datastore [{$datastore->engine}]");
$log .= get_sql_log_html($datastore, 'cache: datastore ['.$datastore->engine.']');
}
return $log;