SIENTIAPDE-1646
Update GITHUB_BRANCH in values.yaml to feature/SIENTIAPDE-1646, refactor mongo_db.py for cleaner code, and enhance worker.py by adding missing commas for improved syntax consistency.
This commit is contained in:
@@ -2,7 +2,7 @@ from temporalio import activity, workflow
|
||||
|
||||
with workflow.unsafe.imports_passed_through():
|
||||
import traceback
|
||||
from datetime import UTC, datetime
|
||||
from datetime import UTC
|
||||
from logging import Logger
|
||||
from typing import Any
|
||||
|
||||
@@ -147,9 +147,7 @@ class MongoDB(SientiaMonitoring):
|
||||
raise e
|
||||
|
||||
@activity.defn(name='aggregate_documents_in_mongodb')
|
||||
def aggregate_documents_in_mongodb(
|
||||
self, input_data: dict[str, Any]
|
||||
) -> list[dict[str, Any]]:
|
||||
def aggregate_documents_in_mongodb(self, input_data: dict[str, Any]) -> list[dict[str, Any]]:
|
||||
"""
|
||||
Aggregate documents in a MongoDB collection based on the provided aggregation pipeline.
|
||||
|
||||
@@ -344,9 +342,7 @@ class MongoDB(SientiaMonitoring):
|
||||
data_filter = {'$or': argument} if argument else {}
|
||||
|
||||
try:
|
||||
self.mongo_db_repository.delete_many(
|
||||
'orchestrated_schedules', data_filter, metadata
|
||||
)
|
||||
self.mongo_db_repository.delete_many('orchestrated_schedules', data_filter, metadata)
|
||||
except Exception as e:
|
||||
trace = traceback.format_exc()
|
||||
self.send_notification(
|
||||
|
||||
Reference in New Issue
Block a user