Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
Setup nuclio timeout (cvat-ai#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
cvat-ai#3301
cvat-ai#6041
  • Loading branch information
PMazarovich authored and mikhail-treskin committed Oct 25, 2023
1 parent 89c8bca commit ea6fc00
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 ea6fc00

Please sign in to comment.