mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +08:00
Minor polishing.
This commit is contained in:
@@ -38,8 +38,9 @@ namespace Orchard.Data.Migration {
|
||||
public ILogger Logger { get; set; }
|
||||
|
||||
public void Activated() {
|
||||
EnsureDistributedLockSchemaExists();
|
||||
|
||||
IDistributedLock @lock;
|
||||
EnsureDistributedLockSchema();
|
||||
if(_distributedLockService.TryAcquireLock(GetType().FullName, TimeSpan.FromMinutes(30), TimeSpan.FromMilliseconds(250), out @lock)) {
|
||||
using (@lock) {
|
||||
// Let's make sure that the basic set of features is enabled. If there are any that are not enabled, then let's enable them first.
|
||||
@@ -72,7 +73,7 @@ namespace Orchard.Data.Migration {
|
||||
/// <summary>
|
||||
/// This ensures that the framework migrations have run for the distributed locking feature, as existing Orchard installations will not have the required tables when upgrading.
|
||||
/// </summary>
|
||||
private void EnsureDistributedLockSchema() {
|
||||
private void EnsureDistributedLockSchemaExists() {
|
||||
// Ensure the distributed lock record schema exists.
|
||||
var schemaBuilder = new SchemaBuilder(_dataMigrationInterpreter);
|
||||
var distributedLockSchemaBuilder = new DistributedLockSchemaBuilder(_shellSettings, schemaBuilder);
|
||||
|
Reference in New Issue
Block a user