Fix error on pandoradb delete cookies file

This commit is contained in:
Calvo 2023-02-17 13:13:37 +01:00
parent 4962c0e769
commit f4d3c65c2b
1 changed files with 4 additions and 2 deletions

View File

@ -53,6 +53,9 @@ my $SMALL_OPERATION_STEP = 1000; # 1000 is default
# Timeout for lock acquisition.
my $LOCK_TIMEOUT = 60;
# Cron cookies file.
my $COOKIES_FILE = '/tmp/cron-session-cookies';
# FLUSH in each IO
$| = 1;
@ -1075,9 +1078,8 @@ sub pandora_delete_old_session_data {
db_do ($dbh, "DELETE FROM tsessions_php WHERE data IS NULL OR id_session REGEXP '^cron-'");
# Delete cron cookies file
my $cookie_file = '/tmp/cron-session-cookies';
log_message ('PURGE', "Deleting cron session file");
unlink($cookie_file) or die log_message ('PURGE', "Could not delete session file");
unlink($COOKIES_FILE);
}