Skip to content

Commit

Permalink
Add changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hmanukyanVMw committed Oct 4, 2023
1 parent a71b44f commit 95fc469
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pkg/persistence/influx_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ func (t *InfluxAdapter) DeleteOldest() error {
func (t *InfluxAdapter) DeleteOlderThan(cutoff int64) (uint64, error) {

adjustedCutoff := time.Unix(0, cutoff).Add(-time.Minute).Truncate(24 * time.Hour).UnixNano()
log.Println("adjustedCutoff: ", adjustedCutoff)

f, e := os.OpenFile("/tmp/testlogfile", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if e != nil {
Expand All @@ -237,7 +238,6 @@ func (t *InfluxAdapter) DeleteOlderThan(cutoff int64) (uint64, error) {
break
}
log.SetOutput(f)
log.Println("adjustedCutoff: ", adjustedCutoff)
log.Println("PRUNED shardID: ", shardID)

err := t.Delete(shardID)
Expand Down

0 comments on commit 95fc469

Please sign in to comment.