Developer forum

Forum » PIM » Build index task

Build index task

Aki Ruuskanen
Aki Ruuskanen
Reply

Hi,

I'm trying to set up a task that builds the insances of a an index. 

The documentation says that the task will "build the instances sequentially". 

But when i run the "Repository Task Handler" all the indexes start building at the same time and I end up with sa indexes with the error "Lock file is already present". 

I would like to build an index, for example every 20 minutes, but only one instance. Shouldn't the "Repository Task Handler" do that or am I misunderstandning something?

/Aki

 

AllStarting.png LockFile.png

Replies

 
Steffen Kruse Hansen Dynamicweb Employee
Steffen Kruse Hansen
Reply
This post has been marked as an answer

Hi Aki,

The documentation is not entirely correct in this case. When you use a 'Repository Task Handler' it will build all instances, except the one which is currently used by the balancer, at the same time. When all these have finished successfully it will start to build the one being used by the balancer.

If you want to build very specific instances, I think it will require some custom code, but why do you need that many instances? Wouldn't two be enough, if it's just a matter of keeping the index updated, and making sure to have a backup in case the build fails?

Best regards,

Steffen

Votes for this answer: 1
 
Aki Ruuskanen
Aki Ruuskanen
Reply

Hi Steffen,

Alright. Thanks for the clarification. 

When several editors are editing products at the same time the index is built every time a product is saved there is a high risk that there wont be available instances for the frontend at times. 

/Aki

 

You must be logged in to post in the forum