Skip to content

Commit

Permalink
Heartbeat cleanup (jupyter-server#378)
Browse files Browse the repository at this point in the history
* minor bug fix in culling logic

* Bump to 0.19.7
  • Loading branch information
Zsailer authored and GitHub Enterprise committed May 18, 2022
1 parent cf347c6 commit b1d2298
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion data_studio_jupyter_extensions/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.19.6" # pragma: no cover
__version__ = "0.19.7" # pragma: no cover
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,21 @@ class DataStudioKernelMonitor(AsyncIOLoopKernelRestarter, KernelStatusMixin):
Values of 0 or lower disable culling. Very short timeouts may result in kernels being culled
for users with poor network connections.""",
).tag(config=True)

cull_interval = IntFromEnv(
name=constants.DS_CULL_INTERVAL,
default_value=300,
help="""The interval (in seconds) on which to check for idle kernels exceeding the
help="""The interval (in seconds) on which to check for idle kernels exceeding the
cull timeout value.""",
).tag(config=True)

cull_connected = BoolFromEnv(
name=constants.DS_CULL_CONNECTED,
default_value=False,
help="""Whether to consider culling kernels which have one or more connections.
Only effective if cull_idle_timeout > 0.""",
).tag(config=True)

cull_busy = BoolFromEnv(
name=constants.DS_CULL_BUSY,
default_value=False,
Expand Down Expand Up @@ -106,7 +109,7 @@ async def poll(self):
"""Poll for Kernel liveliness"""
km = self.kernel_manager

if self.is_culling_enabled:
if self.is_culling_enabled():
await self.cull_if_idle()
return

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ testpaths = [
]

[tool.tbump.version]
current = "0.19.6"
current = "0.19.7"
regex = '''
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
((?P<channel>a|b|rc|.dev)(?P<release>\d+))?
Expand Down
2 changes: 1 addition & 1 deletion src/status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
import { EventListener } from './eventlistener';

// This is managed by tbump config in pyproject.toml
const VERSION = '0.19.6';
const VERSION = '0.19.7';

// Define the error states
// https://github.pie.apple.com/pie-data-studio/notebook-service/blob/761d63604966db5918d2e491c0f89cce454b7f67/app/com/apple/datastudio/model/ResourceState.scala#L20
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.19.6
0.19.7

0 comments on commit b1d2298

Please sign in to comment.