Repository navigation
客体查不到、没人在关的实例,「强制关机」可以点 - #271
Merged
Merged
Conversation
模拟器改成线程卡住时不再自己崩掉(ModAVD/ModAVD#352)以后,卡住的实例查不到客体、又没有开机在做, 状态查询把它判成「实例在自己关机」,busy 是 stopping,界面停在「关机中」,菜单里的「强制关机」也是灰的, 用户在界面里关不掉它。 - InstanceInfo 加 closing_itself(为 false 时省略):busy 为 stopping 只是因为实例像在自己关 (closingItself:客体查不到、没人拿着关机锁、也没有开机在做)时为 true;有 modavd 拿着关机锁在关时没有。 新建中改成 creating 时清掉。 - 卡片菜单:关机中而 closing_itself 为 true、这个页面没有别的任务(开机任务除外)时,「强制关机」能点, 点了照现有的强制关机任务走;我们自己、命令行或别的进程在关时照旧是灰的。主按钮、卡片外观不变。 - 测试:emu 的 TestInfoClosingItself(不建窗口);页面 test_create_cancel.mjs 加一条。 - 假数据加 ?mock=hang 场景;API.md、API.en.md 写明字段;changelog.d 加一条。 Refs ModAVD/ModAVD#352
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.
为什么
ModAVD/ModAVD#352 要把模拟器改成线程卡住时不再自己崩掉,只记录、继续跑。管理器这边现在的行为是:客体查不到、又没有开机在做时,状态查询把实例判成「实例在自己关机」,
busy是stopping,卡片显示「关机中」,主按钮转圈不能点,菜单里的「强制关机」也是灰的。以前卡住的实例 30 秒左右就被崩掉,这个状态一闪而过;模拟器改成不崩以后,卡多久界面就停在「关机中」多久,在界面里没有办法关掉这台。这个 PR 是 ModAVD/ModAVD#352 在管理器这边的配套。改了什么
InstanceInfo加closing_itself(bool,为 false 时省略):busy为stopping只是因为实例看起来在自己关(客体查不到、没人拿着关机锁、也没有开机在做)时为true;有 modavd(这个管理器、命令行或别的进程)拿着关机锁在关时没有这个字段。新建中(busy改成creating)时也清掉。busy的取值和含义都不变。closing_itself为true、这个页面在这台上没有别的任务(开机任务除外,服务端本来就允许开机中发关机)时,「强制关机」能点,点了走现有的强制关机任务,一点就变成我们自己在关,菜单项随即变灰。我们自己、命令行或别的进程在关时照旧是灰的。?mock=hang场景;internal/ui/API.md、API.en.md写明了这个字段;加了changelog.d/352-force-stop-unresponsive.fix.md。怎么测的
internal/emu的TestInfoClosingItself:客体查不到、没人在关时busy为stopping、closing_itself为true(JSON 里有这个键);客体答得上时两者都没有(JSON 里不出现这个键);拿着关机锁时busy为stopping、没有closing_itself。这条和原来的TestClosingItself都不建窗口,用-run点名跑过。scripts/test_create_cancel.mjs加了一条:closing_itself时「强制关机」能点、发的是force: true;没有这个字段、这个页面自己的关机任务在跑或刚发出时是灰的;开机任务在跑时仍能点。gofmt -l .为空;GOOS 为 windows、linux、darwin 的go vet ./...、go build ./...都过;node --experimental-vm-modules --test scripts/test_*.mjs162 条全过;go test ./internal/i18n ./internal/ui过。?mock=hang)看过:1 号客体查不到、没人在关,「强制关机」能点;点了以后这台变成我们在关,菜单项变灰,随后显示已关机。2 号由别的进程拿着关机锁在关,「强制关机」照旧是灰的。没测的
Refs ModAVD/ModAVD#352