mirror of
https://github.com/clearml/clearml-agent
synced 2025-01-31 00:56:53 +00:00
Fix use req_token_expiration_sec when creating a task session and not the default value
This commit is contained in:
parent
0ff428bb96
commit
205cd47cb9
@ -1183,7 +1183,10 @@ class Worker(ServiceCommandSection):
|
||||
Requires that agent session credentials will allow impersonation as task user
|
||||
"""
|
||||
def get_new_session(session, headers):
|
||||
result = session.send(auth_api.LoginRequest(), headers=headers)
|
||||
result = session.send(
|
||||
auth_api.LoginRequest(expiration_sec=session.req_token_expiration_sec),
|
||||
headers=headers
|
||||
)
|
||||
if not (result.ok() and result.response):
|
||||
return
|
||||
new_session = copy(session)
|
||||
|
Loading…
Reference in New Issue
Block a user