SIENTIAPDE-1325

Enhance release workflow to trigger only on merged pull requests and streamline data insertion in DataManager

- Updated the release workflow to execute only when a pull request is merged.
- Simplified the document insertion logic in DataManager by consolidating the dictionary construction.
- Refactored OPC Manager tests to utilize asynchronous mocks for improved accuracy in testing.
This commit is contained in:
vitor-aignosi
2025-11-10 09:14:35 -03:00
parent 373245d5a1
commit 89278827e7
5 changed files with 7 additions and 15 deletions

View File

@@ -261,10 +261,7 @@ class DataManager(SientiaMonitoring):
try:
await self.mongo_repository.insert(
collection_name=topic,
document={
**data,
'inserted_at': now()
},
document={**data, 'inserted_at': now()},
metadata=self.metadata,
)
self.logger.debug(f'Message inserted into MongoDB collection {topic}: {data}')