Commit 02b56829 authored by Yan Sushchynski (EPAM)'s avatar Yan Sushchynski (EPAM)
Browse files

Use ingestion_workflow_client

parent 83077971
Pipeline #77161 passed with stages
in 2 minutes and 38 seconds
......@@ -20,11 +20,11 @@ import logging
import requests
from osdu_api.auth.authorization import TokenRefresher, authorize
from osdu_api.clients.data_workflow.data_workflow_client import \
DataWorkflowClient
from osdu_api.clients.ingestion_workflow.ingestion_workflow_client import \
IngestionWorkflowClient
from osdu_api.configuration.config_manager import DefaultConfigManager
from osdu_api.model.data_workflow.update_status_request import \
UpdateStatusRequest
from osdu_api.model.ingestion_workflow.update_workflow_run_request import \
UpdateWorkflowRunRequest
from osdu_ingestion.libs.context import Context
from osdu_ingestion.libs.mixins import HeadersMixin
......@@ -74,7 +74,7 @@ class UpdateStatus(HeadersMixin):
self.status = status
self.token_refresher = token_refresher
config_manager=DefaultConfigManager()
self.workflow_client = DataWorkflowClient(
self.workflow_client = IngestionWorkflowClient(
config_manager=config_manager,
token_refresher=token_refresher,
data_partition_id=context.data_partition_id
......@@ -88,9 +88,9 @@ class UpdateStatus(HeadersMixin):
:return: The Workflow server response
:rtype: requests.Response
"""
update_status_request = UpdateStatusRequest(self.status)
update_status_request = UpdateWorkflowRunRequest(self.status)
logger.debug(f"Sending request '{update_status_request}'")
response = self.workflow_client.update_status(update_status_request, self.workflow_name, self.run_id)
response = self.workflow_client.update_workflow_run(update_status_request, self.workflow_name, self.run_id)
return response
@authorize()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment