Don't require a daoregistry
This commit is contained in:
parent
4f5a2b3c0c
commit
7d62064dc0
|
@ -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()) {
|
||||||
|
|
Loading…
Reference in New Issue