lsm/micromono

View on GitHub
lib/service/remote.js

Summary

Maintainability
B
5 hrs
Test Coverage

Function checkRemoteServicesAvailability has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

exports.checkRemoteServicesAvailability = function(services, discoveryOptions) {
  var minInterval = 3000
  var remoteServices = []

  Object.keys(services).forEach(function(serviceName) {
Severity: Minor
Found in lib/service/remote.js - About 1 hr to fix

    Function checkAvailability has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function checkAvailability() {
        var now = Date.now()
        remoteServices.forEach(function(service) {
          var scheduler = service.scheduler
          scheduler.each(function(ann) {
    Severity: Minor
    Found in lib/service/remote.js - About 1 hr to fix

      Function buildServiceFromAnnouncement has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      exports.buildServiceFromAnnouncement = function(ann) {
        logger.info('Build remote service from announcement', {
          service: ann.name,
          version: ann.version
        }).trace(ann)
      Severity: Minor
      Found in lib/service/remote.js - About 1 hr to fix

        Function useMiddlewares has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        exports.useMiddlewares = function(uses, routes, service, loadMiddleware, framework) {
        Severity: Minor
        Found in lib/service/remote.js - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status