Skip to content

Commit

Permalink
chore: cleanup unused/obsolete code (#2612)
Browse files Browse the repository at this point in the history
  • Loading branch information
chandumlg committed Oct 26, 2022
1 parent dceaf29 commit f13ea33
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 36 deletions.
2 changes: 0 additions & 2 deletions jobsdb/unionQuery.go
Expand Up @@ -287,15 +287,13 @@ func (*MultiTenantHandleT) getInitialSingleWorkspaceQueryString(ds dataSetT, con
}

if len(customValFilters) > 0 && !conditions.IgnoreCustomValFiltersInQuery {
// mj.assert(!getAll, "getAll is true")
customValQuery = " AND " +
constructQueryOR("jobs.custom_val", customValFilters)
} else {
customValQuery = ""
}

if len(parameterFilters) > 0 {
// mj.assert(!getAll, "getAll is true")
sourceQuery += " AND " + constructParameterJSONQuery("jobs", parameterFilters)
} else {
sourceQuery = ""
Expand Down
4 changes: 2 additions & 2 deletions services/db/nullRecovery.go
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/rudderlabs/rudder-server/config"
)

// HandleNullRecovery decides the recovery Mode (normal/migration) in which app should run
// HandleNullRecovery decides the recovery Mode (normal/degraded) in which app should run
func HandleNullRecovery(forceNormal, forceDegraded bool, currTime int64, appType string) {
enabled := config.GetBool("recovery.enabled", true)
if !enabled {
Expand All @@ -18,7 +18,7 @@ func HandleNullRecovery(forceNormal, forceDegraded bool, currTime int64, appType
if forceMode != "" {
recoveryData.Mode = forceMode
} else if recoveryData.Mode != normalMode {
// If no mode is forced (through env or cli) and if previous mode is migration then setting server mode to normal.
// If no mode is forced (through env or cli) then setting server mode to normal.
recoveryData.Mode = normalMode
}
recoveryHandler := NewRecoveryHandler(&recoveryData)
Expand Down
12 changes: 5 additions & 7 deletions services/db/recovery.go
Expand Up @@ -32,13 +32,11 @@ var (

// RecoveryDataT : DS to store the recovery process data
type RecoveryDataT struct {
StartTimes []int64
ReadableStartTimes []string
DegradedModeStartTimes []int64
ReadableDegradedModeStartTimes []string
MigrationModeStartTimes []int64
ReadableMigrationModeStartTimes []string
Mode string
StartTimes []int64
ReadableStartTimes []string
DegradedModeStartTimes []int64
ReadableDegradedModeStartTimes []string
Mode string
}

var pkgLogger logger.Logger
Expand Down
25 changes: 0 additions & 25 deletions services/multitenant/noop.go

This file was deleted.

0 comments on commit f13ea33

Please sign in to comment.