Reduce lock timeout
MODIFY
src/locking/LockingHelper.ts
src/locking/LockingHelper.ts
@@ -25,7 +25,7 @@ export default class LockingHelper {
}
public static async acquireAsyncTaskManagerLock(tenantID: string): Promise<Lock | null> {
- const lock = LockingManager.createExclusiveLock(tenantID, LockEntity.ASYNC_TASK_MANAGER, 'async-task-manager', 24 * 60 * 60);
+ const lock = LockingManager.createExclusiveLock(tenantID, LockEntity.ASYNC_TASK_MANAGER, 'async-task-manager', 15 * 60);
if (!(await LockingManager.acquire(lock))) {
return null;
}
@@ -33,7 +33,7 @@ export default class LockingHelper {
}
public static async acquireSiteAreaSmartChargingLock(tenantID: string, siteArea: SiteArea): Promise<Lock | null> {
- const lock = LockingManager.createExclusiveLock(tenantID, LockEntity.SITE_AREA, `${siteArea.id}-smart-charging`, 180);
+ const lock = LockingManager.createExclusiveLock(tenantID, LockEntity.SITE_AREA, `${siteArea.id}-smart-charging`, 3 * 60);
if (!(await LockingManager.acquire(lock, Constants.SMART_CHARGING_LOCK_SECS))) {
return null;
}

Reduce lock timeout