Developer forum

Forum » Integration » Overview of Running data Integrations

Overview of Running data Integrations

Umar Farooq
Reply

Hi,

We are utilizing the OData Provider to manage large data sets, which requires data integrations that run for extended periods. To improve monitoring and control, we intend to develop a Service Page that will list all data integration and scheduled jobs, displaying their current statuses that which jobs are currently running, and most importantly a "kill switch" to terminate any running job as needed.

Any insights or recommendations on how to achieve this would be great.


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Umar,

Not sure why you need the custom page for that as the running tasks are shown in DW10 tasks list screen and there is a Cancel button for the running task.

If you are on DW10 you can use this api for that:

Scheduled tasks:

var task = Task.GetTaskById(SomeId);
bool isJobRunning = task is not null && Dynamicweb.Scheduler.TaskHandler.IsTaskRunning(task);            
//Cancelling:
new Dynamicweb.Scheduler.TaskHandler(runFromScheduler: false).CancelRunningTask(task);

DataIntegration job:
bool isJobRunning = !string.IsNullOrEmpty(ActivityId) && (Dynamicweb.DataIntegration.Integration.JobQueue.Instance.IsJobRunning(ActivityId, out _) || Dynamicweb.DataIntegration.Integration.JobQueue.Instance.IsJobQueued(ActivityId));
There is no cancelling api for stopping the directly started Data Integration job for now.

BR, Dmitrij

 

You must be logged in to post in the forum