Skip to content

Commit

Permalink
Setup nuclio timeout (#6840)
Browse files Browse the repository at this point in the history
See these several issues. They are connected to each other in some way. 
The thing is that nuclio has a default timeout of 1 minute. With this
change we can force nuclio dashboard not to terminate the connection.
nuclio/nuclio#3016
#3301
#6041
  • Loading branch information
PMazarovich authored Sep 11, 2023
1 parent 2b29abb commit fa688c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cvat/apps/lambda_manager/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,15 @@ def _http(self, method="get", scheme=None, host=None, port=None,
host or settings.NUCLIO['HOST'],
port or settings.NUCLIO['PORT'])
NUCLIO_FUNCTION_NAMESPACE = function_namespace or settings.NUCLIO['FUNCTION_NAMESPACE']
NUCLIO_TIMEOUT = settings.NUCLIO['DEFAULT_TIMEOUT']
extra_headers = {
'x-nuclio-project-name': 'cvat',
'x-nuclio-function-namespace': NUCLIO_FUNCTION_NAMESPACE,
'x-nuclio-invoke-via': 'domain-name',
'X-Nuclio-Invoke-Timeout': f"{NUCLIO_TIMEOUT}s",
}
if headers:
extra_headers.update(headers)
NUCLIO_TIMEOUT = settings.NUCLIO['DEFAULT_TIMEOUT']

if url:
url = "{}{}".format(NUCLIO_GATEWAY, url)
Expand Down

0 comments on commit fa688c5

Please sign in to comment.