Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Phil Gilligan 25 posts 136 karma points
    Aug 07, 2014 @ 13:12
    Phil Gilligan
    0

    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

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Aug 08, 2014 @ 09:43
    Richard Soeteman
    100

    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

  • Phil Gilligan 25 posts 136 karma points
    Aug 11, 2014 @ 15:57
    Phil Gilligan
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft