diff --git a/polytope_mars/api.py b/polytope_mars/api.py index 76e75d9..8986651 100644 --- a/polytope_mars/api.py +++ b/polytope_mars/api.py @@ -114,10 +114,13 @@ def extract(self, request): f"Datacube type '{self.conf.datacube.type}' not found" ) # noqa: E501 slicer = HullSlicer() + + logging.debug(f"Send log_context to polytope: {self.log_context}") self.api = Polytope( datacube=fdbdatacube, engine=slicer, options=self.conf.options.model_dump(), + context=self.log_context ) end = time.time() @@ -131,11 +134,7 @@ def extract(self, request): start = time.time() logging.info(f"{self.id}: Polytope time start: {start}") # noqa: E501 - if self.log_context: - logging.debug(f"Send log_context to polytope: {self.log_context}") - result = self.api.retrieve(preq, context=self.log_context) - else: - result = self.api.retrieve(preq) + result = self.api.retrieve(preq) end = time.time() delta = end - start