Ticket #1353.
This commit is contained in:
parent
e93da42f5f
commit
1c3f0275b1
|
@ -99,6 +99,9 @@ sub pandora_purgedb ($$) {
|
|||
|
||||
# Delete old export data
|
||||
pandora_delete_old_export_data ($dbh, $ulimit_timestamp);
|
||||
|
||||
# Delete sessions data
|
||||
pandora_delete_old_session_data ($dbh, $ulimit_timestamp);
|
||||
|
||||
# Delete old inventory data
|
||||
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
|
||||
###############################################################################
|
||||
|
|
Loading…
Reference in New Issue