Skip to content

Commit

Permalink
release v0.2.1
Browse files Browse the repository at this point in the history
fix dynamodb key engine: delete unused keys query
  • Loading branch information
redaLaanait committed Jun 14, 2022
2 parents 53db556 + 70f4fa3 commit d8a16ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions dynamodb/key_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -577,9 +577,8 @@ func (e *engine) DeleteUnusedKeys(ctx context.Context, namespace string) (err er
expr, err := expression.NewBuilder().
WithKeyCondition(
expression.Key(hashKey).Equal(expression.Value(namespace)).And(
expression.Key(lsiKey).Between(
expression.Value("disabled@"+strconv.FormatInt(time.Now().Add(-e.GracePeriod).Unix(), 10)),
expression.Value("disabled@"+strconv.FormatInt(time.Now().Unix(), 10)),
expression.Key(lsiKey).LessThanEqual(
expression.Value("disabled@" + strconv.FormatInt(time.Now().Add(-e.GracePeriod).Unix(), 10)),
),
),
).
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
type version string

// VERSION is the current version of the PII Go Module.
const VERSION version = "v0.2.0"
const VERSION version = "v0.2.1"

// Semver parses and returns semver struct.
func (v version) Semver() *semver.Version {
Expand Down

0 comments on commit d8a16ec

Please sign in to comment.