Skip to content

Commit

Permalink
using now()
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianhao-Gu committed Nov 18, 2024
1 parent 1c0d0b5 commit 1f805b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jupyterhub_config/custom_docker_spawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ async def poll(self):
self.log.info(f"Last activity for {self.container_name}: {last_activity}")

Check warning on line 86 in src/jupyterhub_config/custom_docker_spawner.py

View check run for this annotation

Codecov / codecov/patch

src/jupyterhub_config/custom_docker_spawner.py#L85-L86

Added lines #L85 - L86 were not covered by tests

if last_activity:
idle_time = datetime.utcnow() - last_activity
idle_time = datetime.now() - last_activity
self.log.info(f"Idle time for {self.container_name}: {idle_time}")

Check warning on line 90 in src/jupyterhub_config/custom_docker_spawner.py

View check run for this annotation

Codecov / codecov/patch

src/jupyterhub_config/custom_docker_spawner.py#L88-L90

Added lines #L88 - L90 were not covered by tests

if idle_time > self.idle_timeout:
Expand Down

0 comments on commit 1f805b6

Please sign in to comment.