Changeset 1201
- Timestamp:
- 12/27/12 18:26:32 (11 years ago)
- Location:
- trunk/LATMOS-Accounts
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/MANIFEST
r1197 r1201 9 9 bin/la-expired-reminder 10 10 bin/la-find-expired 11 bin/la-sql-freeip12 11 bin/la-gen-passwd 13 12 bin/la-graph.pl … … 24 23 bin/la-sql-edit-form 25 24 bin/la-sql-exchange-ip 25 bin/la-sql-freeip 26 26 bin/la-sql-list-request 27 27 bin/la-sql-loadatt … … 32 32 bin/la-sql-valid-request 33 33 bin/la-sync 34 bin/la-sync-ctl 34 35 bin/la-sync-manager 35 36 bin/la-sync-process -
trunk/LATMOS-Accounts/Makefile.PL
r1197 r1201 50 50 bin/la-sync 51 51 bin/la-sync-manager 52 bin/la-sync-ctl 52 53 bin/la-warn-expire 53 54 bin/la-sql-freeip -
trunk/LATMOS-Accounts/bin/la-sync
r985 r1201 83 83 84 84 if ($batch) { 85 warn "Using la-sync -b is deprecated, use la-sync-ctl -s instead\n"; 85 86 exit ($LA->call_batch_sync ? 0 : 1); 86 87 } -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/SyncManager.pm
r1200 r1201 190 190 } 191 191 192 =head2 reset_module_checkpoint($module) 193 194 Reset the checkpoint for module C<$module> to force it to run at next 195 synchronisation. 196 197 =cut 198 199 sub reset_module_checkpoint { 200 my ($self, $module) = @_; 201 if (!$self->ini->SectionExists($module)) { 202 la_log LA_ERR, "Cannot run inexistant module %s", $module; 203 return; 204 } 205 206 my $modtype = $self->ini->val($module, 'type', $module); 207 my $task = LATMOS::Accounts::Task->new( 208 $modtype, 209 config => $self->{config}, 210 name => $module, 211 syncm => $self, 212 ) 213 or do { 214 la_log(LA_ERR, 'Cannot load module %s', $modtype); 215 return; 216 }; 217 $task->init or do { 218 la_log LA_ERR, "Cannot init module %s", $_; 219 return; 220 }; 221 222 my $ini = $self->_load_state_ini or return; 223 224 $ini->delval($module, 'rev'); 225 $ini->newval($module, 'time', 0); 226 $ini->SetParameterComment( 227 $module, 'time', 228 'Reset to 0 the ' . scalar(localtime(time)), 229 ); 230 231 $task->reset_checkpoint; # Specific reset 232 $ini->RewriteConfig; 233 } 234 192 235 1; 193 236 -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task.pm
r1200 r1201 90 90 } 91 91 92 =head2 reset_checkpoint 93 94 Reset the checkpoint to 0 to force the module to be run again 95 96 =cut 97 98 sub reset_checkpoint { 99 return 1; 100 } 101 92 102 1; 93 103 -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task/Buildnet.pm
r1195 r1201 814 814 } 815 815 816 sub reset_checkpoint { 817 my ($self) = @_; 818 foreach my $zone ($self->_base->search_objects('netzone')) { 819 my $ozone = $self->_base->get_object('netzone', $zone) 820 or next; 821 822 $self->_bnet_state->newval($ozone->id, 'dbrev', 0); 823 la_log LA_DEBUG, "Zone checkpoint reset for %s", $ozone->id; 824 $self->_bnet_state->SetParameterComment( 825 $ozone->id, 'dbrev', 826 'Reset checkpoint the ' . scalar(localtime)); 827 } 828 829 $self->_write_state_file; 830 } 831 816 832 1; 817 833
Note: See TracChangeset
for help on using the changeset viewer.