|
From: <sv...@cy...> - 2016-02-22 15:37:26
|
Author: comsultia
Date: 2016-02-22 16:37:19 +0100 (Mon, 22 Feb 2016)
New Revision: 8610
Log:
Modified:
trunk/frame/_addons/Ext/Elastic/_mdl/eElastic-rlog_clean.job
Modified: trunk/frame/_addons/Ext/Elastic/_mdl/eElastic-rlog_clean.job
===================================================================
--- trunk/frame/_addons/Ext/Elastic/_mdl/eElastic-rlog_clean.job 2016-02-22 15:33:10 UTC (rev 8609)
+++ trunk/frame/_addons/Ext/Elastic/_mdl/eElastic-rlog_clean.job 2016-02-22 15:37:19 UTC (rev 8610)
@@ -74,7 +74,7 @@
if ($tom::Thour >= 18 || $tom::Thour <= 6) # do it only when developers sleep
{
# main::_log("'$indice' $old days " . ($TOM::DEBUG_log_type{'pub'}{'max_days'}+3));
- if ($Ext::Elastic_rlog->{'_manage'} && ($old > ($TOM::DEBUG_log_type{'pub'}{'max_days'}+3)) && $indice=~/\d\d\d\d\-\d\d\-\d\d$/)
+ if ($Ext::Elastic_rlog->{'_manage'} && ($old > ($TOM::DEBUG_log_type{'pub'}{'max_days'} + 14)) && $indice=~/\d\d\d\d\-\d\d\-\d\d$/)
{
my $indice_new=$indice;
$indice_new=~s/\-\d\d$//;
@@ -93,7 +93,7 @@
'on_success' => sub {
my ($action,$response) = @_;
$i++;
- main::_log(" reindex [$i]") if ($i/10000 == int($i/10000));
+ main::_log(" reindex [$i]") if ($i/100000 == int($i/100000));
$bulk_delete->delete({'id' => $response->{'_id'}});
},
);
@@ -107,6 +107,10 @@
}
);
};
+ if ($@)
+ {
+ main::_log("error in reindex ".$@,1);
+ }
$bulk->flush();
$bulk_delete->flush();
@@ -158,7 +162,7 @@
if ($max_days <= $old)
{
- main::_log(" remove older than $max_days days");
+ main::_log(" remove older than $max_days days 1");
my $bulk_delete = $Elastic->bulk_helper(
'index' => $indice,
|