.collect( Collectors.toList() ); log.info( "The lastSynchronized flag of these Events will be updated: " + eventsUIDs ); eventService.updateEventsSyncTimestamp( eventsUIDs, new Date( clock.getStartTime() ) );
.collect( Collectors.toList() ); log.info( "The lastSynchronized flag of these TEIs will be updated: " + teiUIDs ); teiService.updateTrackedEntityInstancesSyncTimestamp( teiUIDs, new Date( clock.getStartTime() ) );
public SynchronizationResult syncCompleteness() { if ( !SyncUtils.testServerAvailability( systemSettingManager, restTemplate ).isAvailable() ) { return SynchronizationResult.newFailureResultWithMessage( "Completeness Synchronisation failed. Remote " + "server is unavailable." ); } final Clock clock = new Clock( log ) .startClock() .logTime( "Starting Completeness Synchronisation job." ); // --------------------------------------------------------------------- // Set time for last success to start of process to make data saved // subsequently part of next synch process without being ignored // --------------------------------------------------------------------- ImportSummary importSummary; try { importSummary = synchronizationManager.executeDataSetCompletenessPush(); if ( checkSummaryStatus( importSummary, SyncEndpoint.COMPLETE_DATA_SET_REGISTRATIONS ) ) { clock.logTime( "SUCCESS! Completeness Synchronisation job is done. It took" ); setLastDataValueSynchronizationSuccess( new Date( clock.getStartTime() ) ); return SynchronizationResult.newSuccessResultWithMessage( "Completeness Synchronisation done. It took " + clock.getTime() + " ms." ); } } catch ( Exception ex ) { log.error( "Exception happened while trying to completeness push " + ex.getMessage(), ex ); } return SynchronizationResult.newFailureResultWithMessage( "Completeness Synchronisation failed."); }
setLastDataValueSynchronizationSuccess( new Date( clock.getStartTime() ) ); return SynchronizationResult.newSuccessResultWithMessage( "DataValueSynchronization done. It took " + clock.getTime() + " ms." );