Fix DELTS sync

This commit is contained in:
ValueOn AG 2025-11-05 15:46:20 +01:00
parent 435c3b9dbf
commit 90ea6b2370
3 changed files with 11 additions and 11 deletions

View file

@ -152,10 +152,10 @@ class ManagerSyncDelta:
log_bytes = log_content.encode('utf-8') log_bytes = log_content.encode('utf-8')
# Upload to SharePoint audit folder # Upload to SharePoint audit folder
await self.services.sharepoint.upload_file( await self.services.sharepoint.uploadFile(
site_id=self.targetSite['id'], siteId=self.targetSite['id'],
folder_path=self.SHAREPOINT_AUDIT_FOLDER, folderPath=self.SHAREPOINT_AUDIT_FOLDER,
file_name=log_filename, fileName=log_filename,
content=log_bytes content=log_bytes
) )
@ -271,7 +271,7 @@ class ManagerSyncDelta:
logger.info(f"Using sync file: {sync_file_name}") logger.info(f"Using sync file: {sync_file_name}")
# Create list-based ticket interface (initialize connector by type) # Create list-based ticket interface (initialize connector by type)
sync_interface = await self.services.ticket._createTicketInterfaceByType( sync_interface = await self.services.ticket.connectTicket(
taskSyncDefinition=self.TASK_SYNC_DEFINITION, taskSyncDefinition=self.TASK_SYNC_DEFINITION,
connectorType="Jira", connectorType="Jira",
connectorParams={ connectorParams={
@ -674,7 +674,7 @@ class ManagerSyncDelta:
try: try:
connectorParams = connectorParams or {} connectorParams = connectorParams or {}
taskSyncDefinition = taskSyncDefinition or self.TASK_SYNC_DEFINITION taskSyncDefinition = taskSyncDefinition or self.TASK_SYNC_DEFINITION
ticket_interface = await self.services.ticket._createTicketInterfaceByType( ticket_interface = await self.services.ticket.connectTicket(
taskSyncDefinition=taskSyncDefinition, taskSyncDefinition=taskSyncDefinition,
connectorType=connectorType, connectorType=connectorType,
connectorParams=connectorParams, connectorParams=connectorParams,
@ -708,7 +708,7 @@ class ManagerSyncDelta:
try: try:
connectorParams = connectorParams or {} connectorParams = connectorParams or {}
taskSyncDefinition = taskSyncDefinition or self.TASK_SYNC_DEFINITION taskSyncDefinition = taskSyncDefinition or self.TASK_SYNC_DEFINITION
ticket_interface = await self.services.ticket._createTicketInterfaceByType( ticket_interface = await self.services.ticket.connectTicket(
taskSyncDefinition=taskSyncDefinition, taskSyncDefinition=taskSyncDefinition,
connectorType=connectorType, connectorType=connectorType,
connectorParams=connectorParams, connectorParams=connectorParams,

View file

@ -2,7 +2,7 @@ from typing import Any, Optional
from datetime import datetime, timezone from datetime import datetime, timezone
# Module-level factory to create TicketInterface by connector type # Module-level factory to create TicketInterface by connector type
async def _createTicketInterfaceByType( async def createTicketInterfaceByType(
*, *,
taskSyncDefinition: dict, taskSyncDefinition: dict,
connectorType: str, connectorType: str,

View file

@ -2,7 +2,7 @@
import logging import logging
from typing import Dict, Any, Optional from typing import Dict, Any, Optional
from modules.interfaces.interfaceTicketObjects import _createTicketInterfaceByType from modules.interfaces.interfaceTicketObjects import createTicketInterfaceByType
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -18,7 +18,7 @@ class TicketService:
""" """
self.services = serviceCenter self.services = serviceCenter
async def _createTicketInterfaceByType( async def connectTicket(
self, self,
taskSyncDefinition: Dict[str, Any], taskSyncDefinition: Dict[str, Any],
connectorType: str, connectorType: str,
@ -34,7 +34,7 @@ class TicketService:
Returns: Returns:
Ticket interface instance Ticket interface instance
""" """
return await _createTicketInterfaceByType( return await createTicketInterfaceByType(
taskSyncDefinition=taskSyncDefinition, taskSyncDefinition=taskSyncDefinition,
connectorType=connectorType, connectorType=connectorType,
connectorParams=connectorParams connectorParams=connectorParams