Skip to content

Commit

Permalink
Merge pull request #2 from kevin-bates/patch-2
Browse files Browse the repository at this point in the history
Culling should go through MappingKernelManager
  • Loading branch information
takluyver authored Jun 13, 2019
2 parents c7b4042 + d721064 commit 9d3c7e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions notebook/services/kernels/kernelmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def shutdown_kernel(self, kernel_id, now=False):
self._check_kernel_id(kernel_id)
kernel = self._kernels.pop(kernel_id)
self.log.info("Shutting down kernel %s", kernel_id)
yield kernel.shutdown()
yield kernel.shutdown(now=now)
self.last_kernel_activity = utcnow()

# Decrease the metric of number of kernels
Expand Down Expand Up @@ -545,4 +545,4 @@ def cull_kernel_if_idle(self, kernel_id):
idle_duration = int(dt_idle.total_seconds())
self.log.warning("Culling '%s' kernel '%s' (%s) with %d connections due to %s seconds of inactivity.",
kernel.execution_state, kernel.kernel_type, kernel_id, connections, idle_duration)
kernel.shutdown()
self.shutdown_kernel(kernel_id, now=True)

0 comments on commit 9d3c7e0

Please sign in to comment.