Developer forum

Forum » Development » IndexBuildFinished notification subscriber

IndexBuildFinished notification subscriber

Justin Breg
Reply

Hello,

I currently have a problem where the IndexBuildFinished notification doesn't fire when an Index has finished building.

Also this is the only notification subscriber that isn't working. Am I missing something or is this a bug?

Here's the bare code:

namespace Bluedesk.NotificationSubscribers
{
    [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Notifications.RepositoryNotification.Index.IndexBuildFinished)]
    class IndexNotification : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
    {
        public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
        {
            if (args == null)
                return;
 
            if (!(args is Dynamicweb.Notifications.RepositoryNotification.Index.IndexBuildFinishedArgs))
                return;
 
            Dynamicweb.Notifications.RepositoryNotification.Index.IndexBuildFinishedArgs builderArgs = (Dynamicweb.Notifications.RepositoryNotification.Index.IndexBuildFinishedArgs)args;
 
        }
    }
}

 

Thanks in advance,

Justin.


Replies

 
Nicolai Pedersen
Reply

Hi Justin

That looks like a bug - it seems that this has never worked on 9 series because of the refactoring of the internals of notifications. Currently the notification is located in Dynamicweb.dll and should be located in Dynamicweb.Indexing.dll instead.

I've registered this under TFS#41344

BR Nicolai

 

You must be logged in to post in the forum