Skip to content

Commit

Permalink
fix(update-tokens): delete tokens older than 30 days only
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed Jun 16, 2021
1 parent 3a82120 commit 4b37738
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/services/update-tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const updateTokens = client => {
if (querySnapshot.size >= maxTokens) {
// clear old not handled tokens
const filterDate = new Date()
filterDate.setDate(filterDate.getDate() - 3)
filterDate.setDate(filterDate.getDate() - 30)
collRef
.where('expires', '<', filterDate.toISOString())
.limit(maxTokens * 2)
Expand Down

0 comments on commit 4b37738

Please sign in to comment.