MCPcopy Create free account
hub / github.com/apache/solr / getFollowerSettings

Function getFollowerSettings

solr/webapp/web/js/angular/controllers/replication.js:184–207  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

182}
183
184var getFollowerSettings = function(data) {
185 var settings = {};
186 settings.leaderUrl = data.follower.leaderUrl;
187 settings.isPollingDisabled = data.follower.isPollingDisabled == 'true';
188 settings.pollInterval = data.follower.pollInterval;
189 settings.isReplicating = data.follower.isReplicating == 'true';
190 settings.nextExecutionAt = data.follower.nextExecutionAt;
191
192 if(settings.isReplicating) {
193 settings.isApprox = true;
194 settings.tick = parseSeconds(settings.pollInterval);
195 } else if (!settings.isPollingDisabled && settings.pollInterval) {
196 if( settings.nextExecutionAt ) {
197 settings.nextExecutionAtEpoch = parseDateToEpoch(settings.nextExecutionAt);
198 settings.currentTime = parseDateToEpoch(data.follower.currentDate);
199
200 if( settings.nextExecutionAtEpoch > settings.currentTime) {
201 settings.isApprox = false;
202 settings.tick = ( settings.nextExecutionAtEpoch - settings.currentTime) / 1000;
203 }
204 }
205 }
206 return settings;
207};
208
209var getLeaderSettings = function(details, isFollower) {
210 var leader = {};

Callers 1

replication.jsFile · 0.85

Calls 2

parseSecondsFunction · 0.85
parseDateToEpochFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…