mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Delete old data that was not exported.
This commit is contained in:
parent
fa3578d35e
commit
92edfd1cdc
@ -83,6 +83,9 @@ sub pandora_purgedb ($$) {
|
|||||||
# Delete old numeric data
|
# Delete old numeric data
|
||||||
pandora_delete_old_module_data ($dbh, 'tagente_datos', $ulimit_access_timestamp, $ulimit_timestamp);
|
pandora_delete_old_module_data ($dbh, 'tagente_datos', $ulimit_access_timestamp, $ulimit_timestamp);
|
||||||
|
|
||||||
|
# Delete old export data
|
||||||
|
pandora_delete_old_export_data ($dbh, $ulimit_timestamp);
|
||||||
|
|
||||||
# Delete extended session data
|
# Delete extended session data
|
||||||
if (enterprise_load (\%conf) != 0) {
|
if (enterprise_load (\%conf) != 0) {
|
||||||
db_do ($dbh, "DELETE FROM tsesion_extended
|
db_do ($dbh, "DELETE FROM tsesion_extended
|
||||||
@ -845,6 +848,18 @@ sub pandora_delete_old_module_data {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Delete old export data.
|
||||||
|
##############################################################################
|
||||||
|
sub pandora_delete_old_export_data {
|
||||||
|
my ($dbh, $ulimit_timestamp) = @_;
|
||||||
|
|
||||||
|
log_message ('PURGE', "Deleting old export data from tserver_export_data\n");
|
||||||
|
while(db_do ($dbh, "DELETE FROM tserver_export_data WHERE UNIX_TIMESTAMP(timestamp) < ? LIMIT $SMALL_OPERATION_STEP", $ulimit_timestamp) ne '0E0') {
|
||||||
|
usleep (10000);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Main
|
# Main
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user