From 4b5dcce021943322d4761dd041438cd7e538e10f Mon Sep 17 00:00:00 2001 From: James Agnew Date: Wed, 17 Oct 2018 08:32:57 -0400 Subject: [PATCH] Add a bit of logging to subscription triggering --- .../jpa/provider/SubscriptionTriggeringProvider.java | 1 + .../SubscriptionTriggeringDstu3Test.java | 12 ++---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/SubscriptionTriggeringProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/SubscriptionTriggeringProvider.java index c352bab7edc..a232e1aadf2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/SubscriptionTriggeringProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/SubscriptionTriggeringProvider.java @@ -173,6 +173,7 @@ public class SubscriptionTriggeringProvider implements IResourceProvider, Applic synchronized (myActiveJobs) { myActiveJobs.add(jobDetails); } + ourLog.info("Subscription triggering requested for {} resource and {} search - Gave job ID: {}", resourceIds.size(), searchUrls.size(), jobDetails.getJobId()); // Create a parameters response IBaseParameters retVal = ParametersUtil.newInstance(myFhirContext); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/SubscriptionTriggeringDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/SubscriptionTriggeringDstu3Test.java index 0fe6d1c959b..23383af682b 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/SubscriptionTriggeringDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/SubscriptionTriggeringDstu3Test.java @@ -62,8 +62,8 @@ public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Te myDaoConfig.setAllowMultipleDelete(true); ourLog.info("Deleting all subscriptions"); - ourClient.delete().resourceConditionalByUrl("Subscription?status=active").execute(); - ourClient.delete().resourceConditionalByUrl("Observation?code:missing=false").execute(); + ourClient.delete().resourceConditionalByUrl("Subscription?_lastUpdated=lt3000").execute(); + ourClient.delete().resourceConditionalByUrl("Observation?_lastUpdated=lt3000").execute(); ourLog.info("Done deleting all subscriptions"); myDaoConfig.setAllowMultipleDelete(new DaoConfig().isAllowMultipleDelete()); @@ -151,8 +151,6 @@ public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Te waitForSize(1, ourUpdatedObservations); assertEquals(Constants.CT_FHIR_JSON_NEW, ourContentTypes.get(0)); - ourClient.registerInterceptor(new LoggingInterceptor(true)); - Parameters response = ourClient .operation() .onInstance(subscriptionId) @@ -199,8 +197,6 @@ public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Te ourSubscriptionTriggeringProvider.setMaxSubmitPerPass(33); - ourClient.registerInterceptor(new LoggingInterceptor(true)); - Parameters response = ourClient .operation() .onInstance(sub1id) @@ -257,8 +253,6 @@ public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Te ourSubscriptionTriggeringProvider.setMaxSubmitPerPass(33); - ourClient.registerInterceptor(new LoggingInterceptor(true)); - Parameters response = ourClient .operation() .onInstance(sub1id) @@ -322,8 +316,6 @@ public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Te ourSubscriptionTriggeringProvider.setMaxSubmitPerPass(50); - ourClient.registerInterceptor(new LoggingInterceptor(true)); - Parameters response = ourClient .operation() .onType(Subscription.class)