diff --git a/src/azul/__init__.py b/src/azul/__init__.py index d07abca40..d91abc9dd 100644 --- a/src/azul/__init__.py +++ b/src/azul/__init__.py @@ -1157,8 +1157,22 @@ def _timing_is_restricted(self) -> bool: if self.lambda_context is None: return False else: - remaining = self.lambda_context.get_remaining_time_in_millis() / 1000 - return remaining <= self.api_gateway_lambda_timeout + function_name = self.lambda_context.function_name + try: + app_name, _, _ = self.unqualified_resource_name_and_suffix(function_name) + except RequirementError: + from chalice.constants import ( + DEFAULT_HANDLER_NAME, + ) + assert function_name == DEFAULT_HANDLER_NAME, function_name + return False + else: + if app_name == 'service': + remaining = self.lambda_context.get_remaining_time_in_millis() / 1000 + return remaining <= self.api_gateway_lambda_timeout + else: + assert app_name == 'indexer', (function_name, app_name) + return False @property def terra_client_timeout(self) -> float: