Skip to content

Commit

Permalink
Update meta adapter to only send config with acquisition ID
Browse files Browse the repository at this point in the history
  • Loading branch information
GDYendell committed Aug 8, 2024
1 parent ab7af96 commit 62657d5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions python/src/odin_data/control/meta_listener_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ def put(self, path, request):

value = str(escape.url_unescape(request.body)).replace('"', '')

if path in self._config_parameters:
# Store config to re-send with acquisition ID when it is changed
self._config_parameters[path] = value

if path == "config/acquisition_id":
self.acquisition_id = value
# Set inactive so process_updates doesn't clear acquisition ID
Expand All @@ -134,14 +138,9 @@ def put(self, path, request):
status_code, response = self._send_config(config)

self.acquisition_id = None
elif path in self._config_parameters:
# Store config to re-send with acquisition ID when it is changed
self._config_parameters[path] = value
elif self.acquisition_id is not None:
parameter = path.split("/", 1)[-1] # Remove 'config/'
config = {
"acquisition_id": self.acquisition_id,
parameter: value
}
config = {"acquisition_id": self.acquisition_id, parameter: value}
status_code, response = self._send_config(config)
else:
return super(MetaListenerAdapter, self).put(path, request)
Expand Down

0 comments on commit 62657d5

Please sign in to comment.