mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Updated
This commit is contained in:
parent
46375234d7
commit
71b3505dcd
@ -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')
|
||||
{
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user