Skip to content

Commit

Permalink
Fix. Ever set async when use invokeAsync method
Browse files Browse the repository at this point in the history
  • Loading branch information
sleipnir committed Nov 7, 2023
1 parent f216d49 commit e455a1c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ The second thing we have to do is add the spawn dependency to the project.
<dependency>
<groupId>com.github.eigr</groupId>
<artifactId>spawn-java-std-sdk</artifactId>
<version>v1.2.2</version>
<version>v1.2.3</version>
</dependency>
```
We're also going to configure a few things for our application build to work, including compiling the protobuf files.
Expand Down Expand Up @@ -128,7 +128,7 @@ See below a full example of the pom.xml file:
<dependency>
<groupId>com.github.eigr</groupId>
<artifactId>spawn-java-std-sdk</artifactId>
<version>v1.2.2</version>
<version>v1.2.3</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>io.eigr.spawn</groupId>
<artifactId>spawn-java-std-sdk</artifactId>
<packaging>jar</packaging>
<version>1.2.2</version>
<version>1.2.3</version>
<name>spawn-java-std-sdk</name>
<url>http://maven.apache.org</url>

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/eigr/spawn/api/ActorRef.java
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ private <T extends GeneratedMessageV3, S extends GeneratedMessageV3> void invoke

Map<String, String> metadata = new HashMap<>();
options.ifPresent(opts -> {
invocationRequestBuilder.setAsync(true);
opts.getDelaySeconds().ifPresent(invocationRequestBuilder::setScheduledTo);
// 'scheduledTo' override 'delay' if both is set.
opts.getScheduledTo()
Expand All @@ -344,6 +343,7 @@ private <T extends GeneratedMessageV3, S extends GeneratedMessageV3> void invoke
Any commandArg = Any.pack(argument);

invocationRequestBuilder
.setAsync(true)
.setSystem(ActorOuterClass.ActorSystem.newBuilder().setName(this.actorId.getSystem()).build())
.setActor(actorRef)
.setActionName(cmd)
Expand Down

0 comments on commit e455a1c

Please sign in to comment.