Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions db-connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -14077,11 +14077,10 @@ func SetDatastoreKeyBulk(ctx context.Context, allKeys []CacheKeyData) ([]Datasto
}

if len(cacheData.Enrichments) > 0 && len(cacheData.Value) == 0 {
if debug {
if debug {
log.Printf("[DEBUG] Having enrichments with empty value doesn't make sense, skipping enrichments for key %s in category %s", cacheData.Key, cacheData.Category)
}


cacheData.Value = config.Value
}

Expand All @@ -14102,7 +14101,7 @@ func SetDatastoreKeyBulk(ctx context.Context, allKeys []CacheKeyData) ([]Datasto
}

cacheData.Enrichments = newObservables
if debug {
if debug {
log.Printf("Found new enrichments: %d for key %s in category %s", len(newObservables), cacheData.Key, cacheData.Category)
os.Exit(3)
}
Expand Down Expand Up @@ -14187,7 +14186,7 @@ func SetDatastoreKeyBulk(ctx context.Context, allKeys []CacheKeyData) ([]Datasto

if len(cacheData.Enrichments) == 0 && len(config.Enrichments) > 0 {
cacheData.Enrichments = config.Enrichments
}
}

if len(cacheData.Tags) == 0 {
cacheData.Tags = config.Tags
Expand Down
4 changes: 3 additions & 1 deletion health.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"bytes"
"context"
"encoding/base64"

// "encoding/json"
"errors"
"fmt"
"github.com/goccy/go-json"
"io"
"io/ioutil"
"log"
Expand All @@ -19,6 +19,8 @@ import (
"strings"
"time"

"github.com/goccy/go-json"

"github.com/Masterminds/semver"
"github.com/frikky/kin-openapi/openapi3"
uuid "github.com/satori/go.uuid"
Expand Down
Loading
Loading