Don't require a daoregistry

This commit is contained in:
James Agnew 2019-08-11 08:25:41 -04:00
parent 4f5a2b3c0c
commit 7d62064dc0
1 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ public class SubscriptionLoader {
private ISubscriptionProvider mySubscriptionProvider; private ISubscriptionProvider mySubscriptionProvider;
@Autowired @Autowired
private SubscriptionRegistry mySubscriptionRegistry; private SubscriptionRegistry mySubscriptionRegistry;
@Autowired @Autowired(required = false)
private IDaoRegistry myDaoRegistry; private IDaoRegistry myDaoRegistry;
private final Object mySyncSubscriptionsLock = new Object(); private final Object mySyncSubscriptionsLock = new Object();
@ -65,7 +65,7 @@ public class SubscriptionLoader {
@SuppressWarnings("unused") @SuppressWarnings("unused")
@Scheduled(fixedDelay = DateUtils.MILLIS_PER_MINUTE) @Scheduled(fixedDelay = DateUtils.MILLIS_PER_MINUTE)
public void syncSubscriptions() { public void syncSubscriptions() {
if (!myDaoRegistry.isResourceTypeSupported("Subscription")) { if (myDaoRegistry != null && !myDaoRegistry.isResourceTypeSupported("Subscription")) {
return; return;
} }
if (!mySyncSubscriptionsSemaphore.tryAcquire()) { if (!mySyncSubscriptionsSemaphore.tryAcquire()) {