mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Ticket #1353.
This commit is contained in:
parent
e93da42f5f
commit
1c3f0275b1
@ -100,6 +100,9 @@ sub pandora_purgedb ($$) {
|
|||||||
# Delete old export data
|
# Delete old export data
|
||||||
pandora_delete_old_export_data ($dbh, $ulimit_timestamp);
|
pandora_delete_old_export_data ($dbh, $ulimit_timestamp);
|
||||||
|
|
||||||
|
# Delete sessions data
|
||||||
|
pandora_delete_old_session_data ($dbh, $ulimit_timestamp);
|
||||||
|
|
||||||
# Delete old inventory data
|
# Delete old inventory data
|
||||||
if (enterprise_load (\%conf) != 0) {
|
if (enterprise_load (\%conf) != 0) {
|
||||||
|
|
||||||
@ -949,6 +952,18 @@ sub pandora_delete_old_export_data {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Delete old session data.
|
||||||
|
##############################################################################
|
||||||
|
sub pandora_delete_old_session_data {
|
||||||
|
my ($dbh, $ulimit_timestamp) = @_;
|
||||||
|
|
||||||
|
log_message ('PURGE', "Deleting old session data from tsessions_php\n");
|
||||||
|
while(db_do ($dbh, "DELETE FROM tsessions_php WHERE last_active < ? LIMIT $SMALL_OPERATION_STEP", $ulimit_timestamp) ne '0E0') {
|
||||||
|
usleep (10000);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Main
|
# Main
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user