Skip to content

Commit

Permalink
issue #922: handles json decoding in uni
Browse files Browse the repository at this point in the history
  • Loading branch information
mrk-vi committed Aug 5, 2024
1 parent e091e20 commit 27e752a
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,16 @@ private static Behavior<Command> onInvokePluginDriverInternal(

switch (pluginDriver.getType()) {
case HTTP: {
VertxUtil.runOnContext(
() -> httpPluginDriverClient.invoke(

VertxUtil.runOnContext(() -> Uni.createFrom().item(() ->
Json.decodeValue(
pluginDriver.getJsonConfig(),
HttpPluginDriverInfo.class
),
)
)
.flatMap(httpPluginDriverInfo -> httpPluginDriverClient
.invoke(
httpPluginDriverInfo,
HttpPluginDriverContext
.builder()
.timestamp(lastIngestionDate)
Expand All @@ -423,6 +427,7 @@ private static Behavior<Command> onInvokePluginDriverInternal(
.datasourceConfig(new JsonObject(datasource.getJsonConfig()).getMap())
.build()
)
)
.onItem()
.invoke(() -> ctx
.getSelf()
Expand All @@ -433,6 +438,7 @@ private static Behavior<Command> onInvokePluginDriverInternal(
.tell(new CancelScheduling(tenantName, scheduler))
)
);

}
}

Expand Down

0 comments on commit 27e752a

Please sign in to comment.