@go-mailer/jarvis 10.10.4 → 10.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -115,6 +115,11 @@ const WalletThrottler = async ({
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
const refreshCache = async ({ tenant_id, wallet_type, balance }) => {
|
|
119
|
+
const balance_key = `wallet:tenant:${tenant_id}:wallet:${wallet_type}`
|
|
120
|
+
await redisClient.set(balance_key, balance * 100) // Store as integer (cents)
|
|
121
|
+
}
|
|
122
|
+
|
|
118
123
|
const refundCredits = async ({
|
|
119
124
|
tenant_id,
|
|
120
125
|
wallet_type,
|
|
@@ -168,6 +173,7 @@ const WalletThrottler = async ({
|
|
|
168
173
|
getWalletRate,
|
|
169
174
|
loadCache,
|
|
170
175
|
refundCredits,
|
|
176
|
+
refreshCache,
|
|
171
177
|
topUpCredits
|
|
172
178
|
}
|
|
173
179
|
}
|