return SynchronizationResult.newSuccessResultWithMessage( "Events synchronization done. It took " + clock.getTime() + " ms." );
return SynchronizationResult.newSuccessResultWithMessage( "Tracker synchronization done. It took " + clock.getTime() + " ms." );
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."); }
return SynchronizationResult.newSuccessResultWithMessage( "DataValueSynchronization done. It took " + clock.getTime() + " ms." );