RackHD/on-core

View on GitHub
lib/services/graph-progress.js

Summary

Maintainability
C
1 day
Test Coverage

Function graphProgressServiceFactory has 164 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function graphProgressServiceFactory(
    _,
    eventsProtocol,
    waterline,
    Logger,
Severity: Major
Found in lib/services/graph-progress.js - About 6 hrs to fix

    Function publishTaskFinished has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        GraphProgressService.prototype.publishTaskFinished = function(task, options) {
            options = options || {};
            return Promise.try(function() {
                assert.object(task, 'task');
                assert.uuid(task.graphId, 'task.graphId');
    Severity: Minor
    Found in lib/services/graph-progress.js - About 1 hr to fix

      Function publishTaskStarted has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          GraphProgressService.prototype.publishTaskStarted = function(task, options) {
              options = options || {};
              return Promise.try(function() {
                  assert.object(task, 'task');
                  assert.object(task.context, 'task.context');
      Severity: Minor
      Found in lib/services/graph-progress.js - About 1 hr to fix

        Function publishTaskProgress has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            GraphProgressService.prototype.publishTaskProgress = function(
                graphId,
                taskId,
                taskProgress,
                options
        Severity: Minor
        Found in lib/services/graph-progress.js - About 1 hr to fix

          Function graphProgressServiceFactory has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              _,
              eventsProtocol,
              waterline,
              Logger,
              Constants,
          Severity: Major
          Found in lib/services/graph-progress.js - About 1 hr to fix

            There are no issues that match your filters.

            Category
            Status