@@ -46,6 +46,7 @@ args = parser.parse_args()
46
46
47
47
EXPORT_MANIFEST_FILENAME = "_manifest"
48
48
KNOWN_CRYPT_STRING = "tackle-cli-known-string-plaintext"
49
+ TOKEN_REFRESH_SECONDS = 240 # 4 minutes to refresh auth token
49
50
50
51
###############################################################################
51
52
@@ -162,7 +163,7 @@ class TackleTool:
162
163
self .Url = tackle2Url
163
164
# Gather Keycloak access token for Tackle
164
165
self .Token = getHubToken (tackle2Url , c ['username' ], c ['password' ], tackle2Token )
165
- self .TokenRenewAfter = int (time .time ()) + 4 * 60 # 4 minutes to refresh token
166
+ self .TokenRenewAfter = int (time .time ()) + TOKEN_REFRESH_SECONDS
166
167
167
168
self .encKeyVerified = False
168
169
if encKey != "" :
@@ -191,7 +192,7 @@ class TackleTool:
191
192
def checkTokenLifetime (self ):
192
193
if self .TokenRenewAfter < int (time .time ()):
193
194
self .Token = getHubToken (self .Url , c ['username' ], c ['password' ], False )
194
- self .TokenRenewAfter = int (time .time ()) + 4 * 60 # 4 minutes to refresh token
195
+ self .TokenRenewAfter = int (time .time ()) + TOKEN_REFRESH_SECONDS
195
196
196
197
def apiJSON (self , url , data = None , method = 'GET' , ignoreErrors = False ):
197
198
debugPrint ("Querying: %s" % url )
0 commit comments