I am using the 'ContentImport.Imported' event to perform a cleanup routine at the end of my data imports. It's used for performing operations like archiving old data, sorting nodes and removing empty folders.
As I have a number of different types of content to import, I have created about a dozen import definitions, with each of them importing a different content type.
As you can imagine, the cleanup routines are fairly inefficient due to them firing after every import instead of just the ones required.
When using 'ContentImport.Imported' is there a way to tell which import definition fired the event? This would really help to reduce the time my imports take to complete.
Thanks Richard. I didn't realise that BulkImport events fire as well as normal import events at the end of each import. This should really help improve the overall speed of my scheduled tasks.
Data Import Clean-up Routines
Hi Richard,
I am using the 'ContentImport.Imported' event to perform a cleanup routine at the end of my data imports. It's used for performing operations like archiving old data, sorting nodes and removing empty folders.
As I have a number of different types of content to import, I have created about a dozen import definitions, with each of them importing a different content type.
As you can imagine, the cleanup routines are fairly inefficient due to them firing after every import instead of just the ones required.
When using 'ContentImport.Imported' is there a way to tell which import definition fired the event? This would really help to reduce the time my imports take to complete.
Kind Regards
Phil
Hi Phil,
If You use ContentImport.BulkImported you get the id and name of the import definition you have saved. The id is the unique id from the database.
Hope you can use it.
Best,
Richard
Thanks Richard. I didn't realise that BulkImport events fire as well as normal import events at the end of each import. This should really help improve the overall speed of my scheduled tasks.
is working on a reply...