Skip to content

Commit 39a8c50

Browse files
authored
refactor: rename and adjust auto_clear_time property, resovles alibaba#38 (alibaba#39)
1 parent 833041e commit 39a8c50

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

rock/admin/proto/request.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ def transform(self):
2929
from rock.rocklet.proto.request import InitDockerEnvRequest
3030

3131
res = InitDockerEnvRequest(**self.model_dump())
32-
res.auto_clear_time = self.auto_clear_time_minutes
3332
return res
3433

3534

rock/deployments/config.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class DockerDeploymentConfig(DeploymentConfig):
7878
remove_container: bool = True
7979
"""Whether to remove the container after it stops running."""
8080

81-
auto_clear_time: int = 30
81+
auto_clear_time_minutes: int = 30
8282
"""Automatic container cleanup time in minutes."""
8383

8484
memory: str = "8g"
@@ -145,6 +145,10 @@ def get_deployment(self) -> AbstractDeployment:
145145

146146
return DockerDeployment.from_config(self)
147147

148+
@property
149+
def auto_clear_time(self) -> int:
150+
return self.auto_clear_time_minutes
151+
148152

149153
class RayDeploymentConfig(DockerDeploymentConfig):
150154
"""Configuration for Ray-based distributed deployment."""

0 commit comments

Comments
 (0)