Changeset 1937 for trunk/LATMOS-Accounts/lib
- Timestamp:
- 01/18/17 12:09:43 (7 years ago)
- File:
-
- 1 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;
Note: See TracChangeset
for help on using the changeset viewer.