Lync User Provisioning retry added

This commit is contained in:
robvde 2014-04-22 17:09:35 +04:00
parent 8f51befe02
commit f38530fd66
3 changed files with 27 additions and 11 deletions

View file

@ -509,7 +509,16 @@ namespace WebsitePanel.Providers.HostedSolution
user.CommitChanges();
//set-plan
SetLyncUserPlanInternal(organizationId, userUpn, plan, runSpace);
int trySleep = 2000; int tryMaxCount = 10; bool PlanSet = false;
for (int tryCount = 0; (tryCount < tryMaxCount) && (!PlanSet); tryCount++)
{
try
{
PlanSet = SetLyncUserPlanInternal(organizationId, userUpn, plan, runSpace);
}
catch { }
if (!PlanSet) System.Threading.Thread.Sleep(trySleep);
}
//initiate addressbook generation
cmd = new Command("Update-CsAddressBook");