Skip to content

Commit

Permalink
add a dispatcher close method after running a single check
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanetteclark committed Oct 27, 2023
1 parent ea15cd3 commit accc956
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/edu/ucsb/nceas/mdq/rest/ChecksResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import edu.ucsb.nceas.mdqengine.store.StoreFactory;
import edu.ucsb.nceas.mdqengine.serialize.JsonMarshaller;
import edu.ucsb.nceas.mdqengine.serialize.XmlMarshaller;
import edu.ucsb.nceas.mdqengine.dispatch.Dispatcher;

/**
* Root resource (exposed at "checks" path)
Expand Down Expand Up @@ -157,6 +158,7 @@ public Response run(
Check check = store.getCheck(id);
run = engine.runCheck(check, input, params, sysMeta);
store.createRun(run);
Dispatcher.getDispatcher("python").close();
} catch (Exception e) {
log.error(e.getMessage(), e);
return Response.serverError().entity(e).build();
Expand Down

0 comments on commit accc956

Please sign in to comment.