Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion api/src/org/labkey/api/docker/DockerSessionListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void valueUnbound(HttpSessionBindingEvent httpSessionBindingEvent)

try
{
DockerService.get().stop(_containerId);
stopContainer(_containerId);
}
catch (Exception ex)
{
Expand All @@ -57,4 +57,13 @@ public void valueUnbound(HttpSessionBindingEvent httpSessionBindingEvent)
}

protected void preStop() {}

/**
* Override to route the stop through a service-specific manager (e.g. DockerRStudioManager) when one tracks
* its own cache of containers; the default here stops via DockerService directly, leaving such a cache stale.
*/
protected void stopContainer(@NotNull String containerId)
{
DockerService.get().stop(containerId);
}
}