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());
|
||||
|
||||
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);
|
||||
|
||||
|
@ -142,10 +146,6 @@ public abstract class AccountingPersistenceBackendFactory {
|
|||
}
|
||||
lock.unlock();
|
||||
return discoveredPersistenceBackend;
|
||||
}else{
|
||||
logger.trace("Renewing Last check Timestamp. The next one will be {}", now);
|
||||
fallbackLastCheck.put(scope, now);
|
||||
lastCheckTimestamp = fallbackLastCheck.get(scope);
|
||||
}
|
||||
}finally {
|
||||
lock.unlock();
|
||||
|
|
Loading…
Reference in New Issue