Skip to content

Commit

Permalink
make armada client autocloseable (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
mladjan-gadzic authored Dec 24, 2024
1 parent 1ac7db7 commit 8046688
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>io.armadaproject</groupId>
<artifactId>java-client</artifactId>
<version>0.0.1</version>
<version>0.0.2</version>
<packaging>jar</packaging>
<description>Java client library for the Armada project</description>
<name>java-client</name>
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/io/armadaproject/ArmadaClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import io.grpc.stub.MetadataUtils;
import java.util.Iterator;

public class ArmadaClient {
public class ArmadaClient implements AutoCloseable {

private final ManagedChannel channel;

Expand Down Expand Up @@ -84,4 +84,9 @@ public JobStatusResponse getJobStatus(JobStatusRequest jobStatusRequest) {
return jobsBlockingStub.getJobStatus(jobStatusRequest);
}

@Override
public void close() throws Exception {
channel.shutdown();
}

}

0 comments on commit 8046688

Please sign in to comment.