hotfix git subscr. debug
This commit is contained in:
parent
d32a54d50b
commit
1c167b1608
|
|
@ -73,6 +73,7 @@ public class GitSubscription implements SubscriptionProvider {
|
|||
|
||||
return map;
|
||||
} catch (Exception e) {
|
||||
SystemLogger.error("Error while reading git repository", CTX, e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,11 +22,9 @@ public class SubscriptionService extends AppService {
|
|||
private final ExecutorService executor = Executors.newSingleThreadExecutor();
|
||||
|
||||
|
||||
|
||||
private final Map<Class<? extends SubscriptionProvider>, SubscriptionProvider> providerCache = new ConcurrentHashMap<>();
|
||||
|
||||
|
||||
|
||||
private final AtomicReference<Future<?>> updateProcess = new AtomicReference<>();
|
||||
|
||||
@Getter
|
||||
|
|
@ -65,12 +63,15 @@ public class SubscriptionService extends AppService {
|
|||
for (var repoConfig : config.getSubscriptions()) {
|
||||
var providerType = repoConfig.getType();
|
||||
var provider = providerCache.get(providerType);
|
||||
try {
|
||||
if (provider == null) {
|
||||
//noinspection unchecked
|
||||
provider = SubscriptionProvider.instantiate((Class<? extends SubscriptionProvider>) providerType, context);
|
||||
//noinspection unchecked
|
||||
providerCache.put((Class<? extends SubscriptionProvider>) providerType, provider);
|
||||
}
|
||||
|
||||
|
||||
var resources = provider.getResources(repoConfig);
|
||||
|
||||
resources.keySet().forEach(key -> {
|
||||
|
|
@ -81,6 +82,9 @@ public class SubscriptionService extends AppService {
|
|||
}
|
||||
available.put(resourceName, resources.get(key));
|
||||
});
|
||||
} catch (Exception e) {
|
||||
SystemLogger.error("Error fetching provider " + provider, CTX, e);
|
||||
}
|
||||
}
|
||||
|
||||
availableResources.clear();
|
||||
|
|
|
|||
Loading…
Reference in New Issue