Skip to content

Commit

Permalink
Merge pull request #3775 from judehung/issue-3774
Browse files Browse the repository at this point in the history
fix(data): add codes to remove db index of reading:deviceName:resourceName when deleting readings
  • Loading branch information
cloudxxx8 authored Oct 25, 2021
2 parents d840d96 + 173b095 commit 2960906
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/pkg/infrastructure/redis/reading.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func (c *Client) asyncDeleteReadingsByIds(readingIds []string) {
_ = conn.Send(ZREM, ReadingsCollectionOrigin, storedKey)
_ = conn.Send(ZREM, CreateKey(ReadingsCollectionDeviceName, r.DeviceName), storedKey)
_ = conn.Send(ZREM, CreateKey(ReadingsCollectionResourceName, r.ResourceName), storedKey)
_ = conn.Send(ZREM, CreateKey(ReadingsCollectionDeviceNameResourceName, r.DeviceName, r.ResourceName), storedKey)
queriesInQueue++

if queriesInQueue >= c.BatchSize {
Expand Down

0 comments on commit 2960906

Please sign in to comment.