refs #3121: New Accounting: IS-Collector doesn't start correctly after upgrade to ghn 6.0.0

https://support.d4science.org/issues/3121

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-publishing/document-store-lib@127005 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2016-04-12 08:22:55 +00:00
parent d4e9c0196b
commit 2cb47cd34c
1 changed files with 14 additions and 4 deletions

View File

@ -219,10 +219,20 @@ public abstract class PersistenceBackendFactory {
persistence = createFallback(context);
persistenceBackends.put(context, persistence);
long now = Calendar.getInstance().getTimeInMillis();
/* The PersistenceBackend is still to be discovered
* setting the last check advanced in time to force rediscover.
*/
fallbackLastCheck.put(context, ((now - FALLBACK_RETRY_TIME) - 1));
try {
Class.forName("org.gcube.informationsystem.collector.impl.utils.Identifier");
// We are on IC so that the rediscovery must be delayed
fallbackLastCheck.put(context, now);
} catch (ClassNotFoundException e) {
/* We are not on IC
* The PersistenceBackend is still to be discovered
* setting the last check advanced in time to force rediscover.
*/
fallbackLastCheck.put(context, ((now - FALLBACK_RETRY_TIME) - 1));
}
}
}