Add async wait to the payload body checker. (#362)
Today, when valid payloads are sent, async polling is not done and the objects are leaked. This fix makes the checker behave the same way as everywhere else - async wait until the dynamic objects can be parsed out of the response and garbage collected to avoid quota issues. Note: this is a quick fix to attempt to resolve the observed quota issues. It may be desirable to improve this in the future, for example, to avoid waiting for async polling if all the dynamic objects are available from names in the request (to avoid waiting to parse the response before deleting it). The above may not be useful in all cases, since some resources may need to be fully created before they can be referenced in order to be deleted.
This commit is contained in:
Родитель
b8c1fd85a1
Коммит
a5b760e25e
|
@ -1163,9 +1163,13 @@ class PayloadBodyChecker(CheckerBase):
|
|||
except Exception:
|
||||
rendered_data = original_rendered_data
|
||||
|
||||
# send out the request
|
||||
# send out the request and parse the response
|
||||
response = self._send_request(parser, rendered_data)
|
||||
request_utilities.call_response_parser(parser, response)
|
||||
async_wait = Settings().get_max_async_resource_creation_time(request.request_id)
|
||||
response_to_parse, _, _ = async_request_utilities.try_async_poll(
|
||||
rendered_data, response, async_wait)
|
||||
request_utilities.call_response_parser(parser, response_to_parse)
|
||||
|
||||
self._set_refresh_req(request, response)
|
||||
|
||||
if not response or not response.status_code:
|
||||
|
|
Загрузка…
Ссылка в новой задаче