fixing locks
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-lib@120297 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e7d89ededf
commit
6c8da75cd3
|
@ -120,7 +120,11 @@ public abstract class AccountingPersistenceBackendFactory {
|
||||||
AccountingPersistenceBackend.class.getSimpleName(), scope, actual.getClass().getSimpleName());
|
AccountingPersistenceBackend.class.getSimpleName(), scope, actual.getClass().getSimpleName());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
lock.lock();
|
||||||
|
logger.trace("Renewing Last check Timestamp. The next one will be {}", now);
|
||||||
|
fallbackLastCheck.put(scope, now);
|
||||||
|
lastCheckTimestamp = fallbackLastCheck.get(scope);
|
||||||
|
lock.unlock();
|
||||||
|
|
||||||
AccountingPersistenceBackend discoveredPersistenceBackend = discoverAccountingPersistenceBackend(scope);
|
AccountingPersistenceBackend discoveredPersistenceBackend = discoverAccountingPersistenceBackend(scope);
|
||||||
|
|
||||||
|
@ -142,10 +146,6 @@ public abstract class AccountingPersistenceBackendFactory {
|
||||||
}
|
}
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
return discoveredPersistenceBackend;
|
return discoveredPersistenceBackend;
|
||||||
}else{
|
|
||||||
logger.trace("Renewing Last check Timestamp. The next one will be {}", now);
|
|
||||||
fallbackLastCheck.put(scope, now);
|
|
||||||
lastCheckTimestamp = fallbackLastCheck.get(scope);
|
|
||||||
}
|
}
|
||||||
}finally {
|
}finally {
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
|
|
Loading…
Reference in New Issue