Skip to content

Commit 8ea78e0

Browse files
committed
fix(update-tokens): minor fix debugging queue queue positions
1 parent fb1cf43 commit 8ea78e0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/services/update-tokens.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const updateTokens = client => {
1010
let queue = 0
1111
const handleRefreshToken = row => {
1212
queue++
13+
const queuePosition = queue
1314
setTimeout(() => {
1415
// start app authentication flux
1516
const reqPromise = refreshToken(row.store_id, row.authentication_id)
@@ -33,12 +34,12 @@ const updateTokens = client => {
3334
})
3435

3536
if (debug) {
36-
debug(`Refresh ${queue}° token for store #${row.store_id}`)
37+
debug(`Refresh ${queuePosition}° token for store #${row.store_id}`)
3738
reqPromise.then(() => {
3839
debug(`✓ Access token updated with success for store #${row.store_id}`)
3940
})
4041
}
41-
}, queue * 1000)
42+
}, queuePosition * 1000)
4243
}
4344

4445
const task = () => {

0 commit comments

Comments
 (0)