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