mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Use c.Spawner to set mem_limit & cpu_limit
mem_limit & cpu_limit are traitlets on the parent Spawner class. Setting these here allows plugins to do the dangerous job of swapping the SystemdSpawner out for something else
This commit is contained in:
@@ -162,8 +162,8 @@ def update_limits(c, config):
|
||||
"""
|
||||
limits = config['limits']
|
||||
|
||||
c.SystemdSpawner.mem_limit = limits['memory']
|
||||
c.SystemdSpawner.cpu_limit = limits['cpu']
|
||||
c.Spawner.mem_limit = limits['memory']
|
||||
c.Spawner.cpu_limit = limits['cpu']
|
||||
|
||||
|
||||
def update_user_environment(c, config):
|
||||
|
||||
Reference in New Issue
Block a user