LobeTia/statszee

View on GitHub
api/services/LineProtocolWriterService.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function writePoint has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  writePoint(point) {
    return new Promise((fullfill, reject) => {

      // TODO: Add Memory-cache Stat findOrCreate (for priming new Stat rows)
      this.getMetricInstance(point)
Severity: Minor
Found in api/services/LineProtocolWriterService.js - About 1 hr to fix

    Function getMetricInstance has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      getMetricInstance(point) {
        const cache = this.app.services.CacheService.getCaches()
    
        return new Promise((fullfill, reject) => {
          cache.get(this.getCacheKey(point), (error, metric) => {
    Severity: Minor
    Found in api/services/LineProtocolWriterService.js - About 1 hr to fix

      TODO found
      Open

                // TODO: Remove ON CONFLICT and just use and UPDATE statement (if Stat findOrCreate is performed)

      TODO found
      Open

       * @description TODO document Service

      TODO found
      Open

            // TODO: Add Memory-cache Stat findOrCreate (for priming new Stat rows)

      There are no issues that match your filters.

      Category
      Status