Changeset 1736 for trunk/LATMOS-Accounts
- Timestamp:
- 03/29/16 17:37:21 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/SyncManager.pm
r1206 r1736 38 38 }; 39 39 40 foreach my $section (qw(basessynchro refreshexpired automatedrequest)) {40 foreach my $section (qw(basessynchro refreshexpired)) { 41 41 if ( !grep { 42 42 lc($ini->val($_, 'type', '')) eq $section … … 105 105 my ($self, $module) = @_; 106 106 107 my $ini = $self->_load_state_ini or return ;107 my $ini = $self->_load_state_ini or return(0, 0); 108 108 109 109 return ($ini->val($module, 'rev', 0), $ini->val($module, 'time', 0)); … … 155 155 } 156 156 157 my ($lastrev ) = $self->get_last_rev($module);157 my ($lastrev, $lastRunTime) = $self->get_last_rev($module); 158 158 my $currentrev = $self->dbrev; 159 159 if (!$task->needupd($lastrev, $currentrev, $self)) { 160 160 la_log LA_DEBUG, "No change on main base, aborting"; 161 return 1; 162 } 163 164 my $currentTime = time; 165 166 if ($currentTime < $lastRunTime + $task->runDelay) { 167 la_log LA_DEBUG, "Too short delay to run task, waiting"; 161 168 return 1; 162 169 }
Note: See TracChangeset
for help on using the changeset viewer.