We followed this code for configuring auto-staging on a Kentico 12 MVC site. There is only one configured and enabled target Staging Server, while there are ~25 sites on this Kentico instance.
When I make a change to a page of content, there is one staging task generated, and this is executed once (makes sense, since there is one staging server configured). When I change a user who is assigned to a single site, there is one staging task created, however, this task is executed 25 times. When I add debugging code, the code that iterates through the target servers (see code in link above), executes for each configured site in this Kentico instance (25 sites).
The following code retrieves the multiple servers associated with the task:
var taskServerIds = SynchronizationInfoProvider.GetSynchronizations()
.Column("SynchronizationServerID")
.WhereEquals("SynchronizationTaskID", e.Task.TaskID);
I would have assumed only 1 site would be associated with the change to the user. Why are all the sites in this instance associated with this task which only seems to be related to one site? Our custom code that utilizes the Kentico API to make content changes is also reacting the same way, executing 25 times per task.
We are troubleshooting content staging issues and I'm just trying to exclude this multiple target servers as a factor.
Thank you.