mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Narrowed the lock scope to per-thread.
This commit is contained in:
@@ -30,7 +30,7 @@ namespace Orchard.Data.Migration {
|
|||||||
|
|
||||||
public void Activated() {
|
public void Activated() {
|
||||||
DistributedLock @lock;
|
DistributedLock @lock;
|
||||||
if(_distributedLockService.TryAcquireLockForMachine(GetType().FullName, TimeSpan.FromMinutes(30), TimeSpan.FromMilliseconds(250), out @lock)) {
|
if(_distributedLockService.TryAcquireLockForThread(GetType().FullName, TimeSpan.FromMinutes(30), TimeSpan.FromMilliseconds(250), out @lock)) {
|
||||||
using (@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.
|
// 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.
|
||||||
var theseFeaturesShouldAlwaysBeActive = new[] {
|
var theseFeaturesShouldAlwaysBeActive = new[] {
|
||||||
|
|||||||
Reference in New Issue
Block a user