For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
22 4 4 8

Deleting DSS API schedule takes 240 seconds to complete.

It takes over 240 seconds to delete a temporary schedule.

Is this normal or is there something else I need to do first?


Flow is like this


// Create an immediate schedule

var schedule = new Schedule

{

Name = scheduleName,

TimeZone = TimeZone.CurrentTimeZone.StandardName,

Recurrence = ScheduleRecurrence.CreateSingleRecurrence(DateTimeOffset.UtcNow, true),

Trigger = ScheduleTrigger.CreateImmediateTrigger(true),

ListId = instrumentListId,

ReportTemplateId = reportTemplateId,

OutputFileName = outputFileName

};

_extractionsContext.ScheduleOperations.Create(schedule);


// get files

// delete files

_extractionsContext.ExtractedFileOperations.DeleteMultiple(fileIds);


// delete schedule (this is taking over 240 seconds to complete)

_extractionsContext.ScheduleOperations.Delete(schedule);


// delete instrument list

_extractionsContext.InstrumentListOperations.Delete(instrumentListId);

dss-rest-apidatascope-selectdss
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
32.2k 40 11 19

Hello @Lukasz Ossowski,

I am supposing that the lengthy time for you is consistent across days and usages, not just on a single request?

In my experience, the deletion, as well as creation of DSS entities such as schedules is uneven, in terms of the time it takes. As I run these via Postman, as direct requests, sometimes it completes so fast, that appears to be instantaneous, and sometimes it takes time, 240s would be at the high end for schedule deletion, but not unreasonable.

In order to eliminate the possibility of any other code causing delays, I would like to suggest to test via raw request, submitting it using Postman tool.

You can follow the steps of tutorial REST API Tutorial 10: GUI control calls: immediate extract that are specific to schedule create and delete, you can download the collection of ready request from the included download link to minimize the effort.

If you run create and delete the schedule directly and observe reasonable completion time, review your code, and perhaps try to pare it down till the request works as expected and then build back up to the full business requirements.

If you observe delays on Postman submission of deletion, it will need to be investigated more closely on your specific request and your specific environment, so in this case the best approach would be, as a customer, submitting a support request on Refinitiv Helpdesk Online for product DSS and having our experts investigate your specific submission.

Hope this helps, please let us know if you are unable to proceed?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes

Hi Zoya,


In Lukasz's absence, I'd like to follow up on your response, as client came back with the below.

Could you please advise?


The code I have is lifted from the c# Dss sample application.


And just to be sure I ran the c# Dss sample application and I see the same behaviour during the CleanUp.

This leads me to believe that there is an issue with the environment.


I get the same behaviour using my dev account and our prod account

DssClient.DeleteSchedule:

Elapsed time for schedule delete is 241.717815 seconds

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
32.2k 40 11 19

Hello @aleksandra.kluczniak_refinitiv,

The client mentions, that it also takes them long to delete schedule over DSS GUI example, as well as the custom code request.

I have just tested DSS GUI Example => Schedule Delete, twice and both tests took under 1 second to complete:

Please test the same, via example, and let us know. If DSS GUI example Schedule Delete, which is small, also consistently takes inordinate amount of time, I would suppose, that an investigation into local environment with the help of local network admin may be required.

If this delete runs consistently short, would compare example code against teh custom code and look for the differences.

Let us know how this works on your side.


scheduledelete.gif (84.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
22 4 4 8

Hi Zoya,


I spoke with the client and he confirmed that he did not refer to DSS GUI in his reply. Apart from that, GUI deletions work quick and fine, however, as he specifies that he is using C# and both of his accounts, test and prod have the same problem, it must be a C# issue:


"The code I have is lifted from the c# Dss sample application.

And just to be sure I ran the c# Dss sample application and I see the same behaviour during the CleanUp.This leads me to believe that there is an issue with the environment.


I get the same behaviour using my dev account and our prod account

DssClient.DeleteSchedule:

Elapsed time for schedule delete is 241.717815 seconds."


Please advise,

Lukasz


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @Lukasz Ossowski,

DSS GUI example is implemented using C#. It can be downloaded from REST API Help on DSS Hosted

I was suggesting for the client to run it, as is, without modifications, to test deletion, on the client side. This should be quick and easy for them to test.

If it runs at the expected speed for them, go back to the code that the client is running, compare it to DSS GUI example implementation, and try to pinpoint the modification that can potentially be causing the slowdown.

For me this deletion code runs at usual speed.

Let me know if this helps?

Upvotes
1 0 0 0

Narrowed this issue down to some tidy up code which is called after the files have been downloaded and before we delete the temporary schedule

var scheduleExtractions = _extractionsContext.ReportExtractionOperations.GetByScheduleId(scheduleId);

foreach (var reportExtraction in scheduleExtractions)

{

_extractionsContext.LoadProperty(reportExtraction, "Files");

var fileIds = reportExtraction.Files

.Where(extractedFile => extractedFile.ContentsExists)

.Select(extractedFile => extractedFile.ExtractedFileId)

.ToList();

if (fileIds.Count > 0)

{

_extractionsContext.ExtractedFileOperations.DeleteMultiple(fileIds);

}

}

I we don't call _extractionsContext.ExtractedFileOperations.DeleteMultiple(fileIds) then the schedule delete returns in a second.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 0 0

We get the same behaviour when running the Datascope REST API Examples and selecting and running Scheduled Extractions | CleanUp

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
32.2k 40 11 19

Hello @c.paterson,

On Cleanup I observe the same as you:

I can suggest my explanation of what is happening, in the example, and likely the same, in your custom code.

If you take a look at the steps completed in the example code, you will observe that it's not a simple Delete of schedule, rather a complex sequence of steps in this example. The processing on the client is asynchronous, but as the requests are submitted to the service, those of them that have dependencies on each other are sequenced for execution to be completed in a safe manner. Delete of fields takes longer, and until it is safely completed, delete of the same schedule will not be able to proceed.

Please observe that if you require to just delete schedules in their entirety, you can do the same as Schedule Example -> Delete, and it should take much less time for you to complete, although not instantaneous on my side either.

But if you require to first delete the fields, and then, next, to delete schedules, then that is expected to take longer as in the example.

Hope this helps?


cleanup.gif (52.4 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 0 0

Thanks.

I will remove the offending code as I don't think it is adding any value.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.