Skip to content

Commit

Permalink
Make serve config configurable on spring boot adapter (#56)
Browse files Browse the repository at this point in the history
* expose serve config to be configurable
* update version for adapter

---------
Co-authored-by: Darwin D Wu <[email protected]>
  • Loading branch information
darwin67 authored Jul 18, 2024
1 parent 757d6f8 commit aab3c42
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion inngest-spring-boot-adapter/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.3
0.0.4
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ public abstract class InngestConfiguration {
protected abstract Inngest inngestClient();

@Bean
protected CommHandler commHandler(@Autowired Inngest inngestClient) {
// TODO: Add missing configuration
ServeConfig serveConfig = new ServeConfig(inngestClient);
return new CommHandler(functions(), inngestClient, serveConfig, frameworkName);
protected abstract ServeConfig serve(@Autowired Inngest inngestClient);

@Bean
protected CommHandler commHandler(@Autowired Inngest inngestClient, @Autowired ServeConfig serve) {
return new CommHandler(functions(), inngestClient, serve, frameworkName);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ public HashMap<String, InngestFunction> functions() {
}

@Override
public Inngest inngestClient() {
protected Inngest inngestClient() {
return new Inngest("spring_demo");
}

@Override
protected ServeConfig serve(Inngest inngestClient) {
return new ServeConfig(inngestClient);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ protected Inngest inngestClient() {
return new Inngest("spring_test_demo");
}

@Override
protected ServeConfig serve(Inngest client) {
return new ServeConfig(client);
}

@Bean
protected CommHandler commHandler(@Autowired Inngest inngestClient) {
ServeConfig serveConfig = new ServeConfig(inngestClient);
Expand Down

0 comments on commit aab3c42

Please sign in to comment.