Skip to content

Commit

Permalink
move context passs to polytope
Browse files Browse the repository at this point in the history
  • Loading branch information
mathleur committed Nov 4, 2024
1 parent 1d9589a commit 80521a4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions polytope_mars/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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
Expand Down

0 comments on commit 80521a4

Please sign in to comment.