File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,10 @@ const updateTokens = client => {
10
10
let queue = 0
11
11
const handleRefreshToken = row => {
12
12
queue ++
13
- const queuePosition = queue
13
+ if ( debug ) {
14
+ debug ( `Refresh ${ queue } ° token for store #${ row . store_id } ` )
15
+ }
16
+
14
17
setTimeout ( ( ) => {
15
18
// start app authentication flux
16
19
const reqPromise = refreshToken ( row . store_id , row . authentication_id )
@@ -34,12 +37,11 @@ const updateTokens = client => {
34
37
} )
35
38
36
39
if ( debug ) {
37
- debug ( `Refresh ${ queuePosition } ° token for store #${ row . store_id } ` )
38
40
reqPromise . then ( ( ) => {
39
41
debug ( `✓ Access token updated with success for store #${ row . store_id } ` )
40
42
} )
41
43
}
42
- } , queuePosition * 1000 )
44
+ } , queue * 1000 )
43
45
}
44
46
45
47
const task = ( ) => {
You can’t perform that action at this time.
0 commit comments