|
21 | 21 |
|
22 | 22 | import java.util.List; |
23 | 23 | import java.util.Locale; |
| 24 | +import java.util.Map; |
| 25 | +import java.util.Map.Entry; |
24 | 26 | import java.util.Properties; |
25 | 27 | import java.util.Set; |
| 28 | +import java.util.UUID; |
26 | 29 |
|
27 | 30 | import org.killbill.billing.account.api.Account; |
28 | 31 | import org.killbill.billing.account.api.AccountApiException; |
| 32 | +import org.killbill.billing.entitlement.api.Subscription; |
| 33 | +import org.killbill.billing.entitlement.api.SubscriptionApiException; |
| 34 | +import org.killbill.billing.entitlement.api.SubscriptionEvent; |
29 | 35 | import org.killbill.billing.invoice.api.Invoice; |
30 | 36 | import org.killbill.billing.invoice.api.InvoiceItem; |
31 | 37 | import org.killbill.billing.invoice.api.formatters.InvoiceFormatter; |
@@ -90,9 +96,21 @@ public void handleKillbillEvent(final ExtBusEvent killbillEvent) { |
90 | 96 | logger.info("KB healthcheck result: {}", result.isHealthy()); |
91 | 97 | result = healthCheckRegistry.runHealthCheck("org.killbill.billing.server.healthchecks.KillbillPluginsHealthcheck"); |
92 | 98 | logger.info("Plugins healthcheck result: {}", result.isHealthy()); |
93 | | - result = healthCheckRegistry.runHealthCheck("com.killbill.billing.plugin.aviate.AviateHealthCheck"); //This line fails |
94 | | - logger.info("Aviate healthcheck result: {}", result.isHealthy()); |
| 99 | + Map<String, Object> pluginHealthDetails = result.getDetails(); |
| 100 | + for(Entry<String, Object> entry: pluginHealthDetails.entrySet()) { |
| 101 | + String pluginKey = entry.getKey(); |
| 102 | + Map<Object, Object> pluginDetails = (Map)entry.getValue(); |
| 103 | + logger.info("Plugin {}, Details {}", entry.getKey(), entry.getValue()); |
| 104 | + } |
95 | 105 | break; |
| 106 | + case SUBSCRIPTION_CREATION: |
| 107 | + try { |
| 108 | + Subscription subscription = osgiKillbillAPI.getSubscriptionApi().getSubscriptionForEntitlementId(killbillEvent.getObjectId(), true, context); |
| 109 | + List<SubscriptionEvent> events = subscription.getSubscriptionEvents(); |
| 110 | + logger.info("events:"+events); |
| 111 | + } catch (SubscriptionApiException e) { |
| 112 | + throw new RuntimeException(e); |
| 113 | + } |
96 | 114 | case INVOICE_CREATION: |
97 | 115 |
|
98 | 116 | final Account account; |
|
0 commit comments