fix: 下发前强制刷新设备发现,避免 device offline 误判
This commit is contained in:
parent
a10f5dd71d
commit
b51ee0f6a1
@ -1331,6 +1331,9 @@ func (u *UI) actionConsoleSave(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// Step 4: run pipeline (creates tasks asynchronously).
|
||||
if u.discovery != nil {
|
||||
u.discovery.SearchDefault()
|
||||
}
|
||||
results, _ := u.autoConfig.BuildPipelineBatch(requests, true)
|
||||
|
||||
// Collect task IDs for redirect.
|
||||
@ -1400,6 +1403,10 @@ func (u *UI) actionWizardApply(w http.ResponseWriter, r *http.Request) {
|
||||
if u.preview != nil && len(req.Features) > 0 {
|
||||
_ = u.preview.SaveDeviceFeatures(req.DeviceID, req.Features)
|
||||
}
|
||||
// Force rediscovery so the task sees the device as online.
|
||||
if u.discovery != nil {
|
||||
u.discovery.SearchDefault()
|
||||
}
|
||||
result, err := u.autoConfig.BuildPipeline(service.AutoConfigRequest{
|
||||
DeviceID: req.DeviceID,
|
||||
Features: req.Features,
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user