I have a group of nodes in umbraco that are read only. They are created / deleted / updated based on an import script that runs against the output of an external webservice query.
Currently I have my import script running in a standard aspx page with a code beind on it. Unfortunately it is therefore limited to completing within the standard request timeout period. There are a lot of nodes, so this approach is no good as it invariably times out before completing.
I had therefore started to write a standalone console app that would use the document service to talk to umbraco. Unfortunately I need to get the date last edited (to check if the version in the web service is newer than in umbraco) but the document service doesn't seem to expose this anywhere?
My last option would therefore be to use /base. So my question is, if I call a base webservice, can the underlying method just go ahead and crunch away for an hour or so? Or will it be limited to the standard request timeout period? What would I need to do to get it to crunch? Return a status code of 200 right away and close the response, then go and crunch?
Standard timeout procedure, unfortunately. However, you can replace your "foreach" with Parallel.ForEach(), which multi-threads your code. If the actual import method is designed to handle single-records, then this works an absolute dream.
I used the Umbraco document service to try and import 280 records a while back. The thing timed out after 45 minutes, having imported ~250 items, and each request was taking longer and longer to process each time. Using Parallel.ForEach reduced it to 172 seconds, 100% imported.
Document service or base?
Hi All,
I have a group of nodes in umbraco that are read only. They are created / deleted / updated based on an import script that runs against the output of an external webservice query.
Currently I have my import script running in a standard aspx page with a code beind on it. Unfortunately it is therefore limited to completing within the standard request timeout period. There are a lot of nodes, so this approach is no good as it invariably times out before completing.
I had therefore started to write a standalone console app that would use the document service to talk to umbraco. Unfortunately I need to get the date last edited (to check if the version in the web service is newer than in umbraco) but the document service doesn't seem to expose this anywhere?
My last option would therefore be to use /base. So my question is, if I call a base webservice, can the underlying method just go ahead and crunch away for an hour or so? Or will it be limited to the standard request timeout period? What would I need to do to get it to crunch? Return a status code of 200 right away and close the response, then go and crunch?
Thanks,
Tom
Standard timeout procedure, unfortunately. However, you can replace your "foreach" with Parallel.ForEach(), which multi-threads your code. If the actual import method is designed to handle single-records, then this works an absolute dream.
I used the Umbraco document service to try and import 280 records a while back. The thing timed out after 45 minutes, having imported ~250 items, and each request was taking longer and longer to process each time. Using Parallel.ForEach reduced it to 172 seconds, 100% imported.
HTH,
Benjamin
is working on a reply...