fix(sdk): fix auto_clear_time conversion and wait_interval boundary #882#883
Merged
zhongwen666 merged 1 commit intoalibaba:masterfrom Apr 22, 2026
Merged
Conversation
StephenRi
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动功能点
auto_clear_time从秒转分钟时产生浮点数的问题,改为向上取整为整数wait_for_process()中wait_interval可能大于auto_clear_seconds导致沙箱在轮询前被清除的问题代码改动点
rock/sdk/sandbox/client.py: 新增import mathrock/sdk/sandbox/client.py:171-172:auto_clear_time和auto_clear_time_minutes从auto_clear_seconds / 60改为int(math.ceil(auto_clear_seconds / 60)),确保传给服务端的值为整数分钟且向上取整rock/sdk/sandbox/client.py:641: 在wait_for_process()中增加wait_interval = min(self.config.auto_clear_seconds - 2, wait_interval),确保轮询间隔小于自动清理时间关联 Issue
refs #882