- Timestamp:
- 01/18/17 12:09:43 (7 years ago)
- Location:
- trunk/LATMOS-Accounts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Stat.pm
r1933 r1937 8 8 use base qw(LATMOS::Accounts::Bases::Sql::objects); 9 9 use LATMOS::Accounts::I18N; 10 11 use DateTime; 10 12 11 13 our $VERSION = (q$Rev$ =~ /^Rev: (\d+) /)[0]; … … 45 47 display => { }, 46 48 delay => { }, 49 retention => { }, 47 50 lastStatId => { }, 48 51 needRun => { … … 184 187 my ($self) = @_; 185 188 189 if (my $retention = $self->_get_attributes('retention')) { 190 my $limit = DateTime->now->subtract(days => $retention); 191 192 my $clean = $self->db->prepare( 193 q{ DELETE FROM statsentry where tstamp < ? } 194 ); 195 $clean->execute($limit->iso8601); 196 } 197 186 198 my $otype = $self->_get_attributes('otype') or return; 187 199 my $attribute = $self->_get_attributes('attribute') or return; -
trunk/LATMOS-Accounts/man/man8/latmos-accounts-base-sql.pod
r1934 r1937 327 327 The number of day between two run 328 328 329 =head4 retention 330 331 If set, the duration in days after which stats value must deleted
Note: See TracChangeset
for help on using the changeset viewer.