Cleanup
This commit is contained in:
parent
daf82063d1
commit
a8196b30ad
@ -49,7 +49,7 @@ namespace AsPartitionProcessing
|
|||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// When initialSetUp=false, sets the maximum number of threads on which to run processing commands in parallel. -1 will not set the value.
|
/// Sets the maximum number of threads on which to run processing commands in parallel. -1 will not set the value.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int MaxParallelism { get; set; }
|
public int MaxParallelism { get; set; }
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ namespace AsPartitionProcessing
|
|||||||
/// <param name="integratedAuth">Should always set to true for SSAS implementations that will run under the current process account. For Azure AS, normally set to false.</param>
|
/// <param name="integratedAuth">Should always set to true for SSAS implementations that will run under the current process account. For Azure AS, normally set to false.</param>
|
||||||
/// <param name="userName">Only applies when integratedAuth=false. Used for Azure AD UPNs to connect to Azure AS.</param>
|
/// <param name="userName">Only applies when integratedAuth=false. Used for Azure AD UPNs to connect to Azure AS.</param>
|
||||||
/// <param name="password">Only applies when integratedAuth=false. Used for Azure AD UPNs to connect to Azure AS.</param>
|
/// <param name="password">Only applies when integratedAuth=false. Used for Azure AD UPNs to connect to Azure AS.</param>
|
||||||
/// <param name="maxParallelism">When initialSetUp=false, sets the maximum number of threads on which to run processing commands in parallel. -1 will not set the value.</param>
|
/// <param name="maxParallelism">Sets the maximum number of threads on which to run processing commands in parallel. -1 will not set the value.</param>
|
||||||
/// <param name="commitTimeout">Set to override of CommitTimeout server property value for the connection. -1 will not override; the server value will be used.</param>
|
/// <param name="commitTimeout">Set to override of CommitTimeout server property value for the connection. -1 will not override; the server value will be used.</param>
|
||||||
/// <param name="tableConfigurations">Collection of partitioned tables containing configuration information.</param>
|
/// <param name="tableConfigurations">Collection of partitioned tables containing configuration information.</param>
|
||||||
public ModelConfiguration(
|
public ModelConfiguration(
|
||||||
|
@ -168,13 +168,6 @@ namespace AsPartitionProcessing
|
|||||||
templatePartition.RequestRefresh(RefreshType.DataOnly);
|
templatePartition.RequestRefresh(RefreshType.DataOnly);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//If initital setup, process tables sequentially
|
|
||||||
if (_modelConfiguration.InitialSetUp)
|
|
||||||
{
|
|
||||||
LogMessage($"Save changes for table {tableConfiguration.AnalysisServicesTable} ...", true);
|
|
||||||
database.Model.SaveChanges();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Commit the data changes, and bring model back online if necessary
|
//Commit the data changes, and bring model back online if necessary
|
||||||
@ -184,18 +177,15 @@ namespace AsPartitionProcessing
|
|||||||
LogMessage(new String('-', 16), false);
|
LogMessage(new String('-', 16), false);
|
||||||
|
|
||||||
//Save changes setting MaxParallelism if necessary
|
//Save changes setting MaxParallelism if necessary
|
||||||
if (!_modelConfiguration.InitialSetUp)
|
if (_modelConfiguration.MaxParallelism == -1)
|
||||||
{
|
{
|
||||||
if (_modelConfiguration.MaxParallelism == -1)
|
LogMessage("Save changes ...", true);
|
||||||
{
|
database.Model.SaveChanges();
|
||||||
LogMessage("Save changes ...", true);
|
}
|
||||||
database.Model.SaveChanges();
|
else
|
||||||
}
|
{
|
||||||
else
|
LogMessage($"Save changes with MaxParallelism={Convert.ToString(_modelConfiguration.MaxParallelism)}...", true);
|
||||||
{
|
database.Model.SaveChanges(new SaveOptions() { MaxParallelism = _modelConfiguration.MaxParallelism });
|
||||||
LogMessage($"Save changes with MaxParallelism={Convert.ToString(_modelConfiguration.MaxParallelism)}...", true);
|
|
||||||
database.Model.SaveChanges(new SaveOptions() { MaxParallelism = _modelConfiguration.MaxParallelism });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Perform recalc if necessary
|
//Perform recalc if necessary
|
||||||
|
Loading…
Reference in New Issue
Block a user