[P] Add CI for updated Hub component part
Some checks failed
Hub component testing / hub-test (push) Failing after 24s
Some checks failed
Hub component testing / hub-test (push) Failing after 24s
This commit is contained in:
@@ -13,7 +13,7 @@ class StoreApiAdapter(StoreGateway):
|
||||
def __init__(self, api_base_url):
|
||||
self.api_base_url = api_base_url
|
||||
|
||||
def save_data(self, processed_agent_data_batch: List[ProcessedAgentData]):
|
||||
def processed_agent_data_batch_to_json(self, processed_agent_data_batch: List[ProcessedAgentData]):
|
||||
if not processed_agent_data_batch:
|
||||
return False
|
||||
|
||||
@@ -25,6 +25,14 @@ class StoreApiAdapter(StoreGateway):
|
||||
"user_id": user_id
|
||||
}
|
||||
|
||||
return payload
|
||||
|
||||
def save_data(self, processed_agent_data_batch: List[ProcessedAgentData]):
|
||||
payload = self.processed_agent_data_batch_to_json(processed_agent_data_batch)
|
||||
|
||||
if payload == False:
|
||||
return False
|
||||
|
||||
try:
|
||||
# Perform a POST request to the Store API with a 10-second timeout
|
||||
response = requests.post(
|
||||
|
||||
Reference in New Issue
Block a user