mirror of
https://github.com/getcompanion-ai/computer-host.git
synced 2026-04-15 03:00:42 +00:00
fix: remove reconcile from ListMachines to prevent race with concurrent operations
This commit is contained in:
parent
00f0795cb9
commit
637036b8c8
1 changed files with 1 additions and 5 deletions
|
|
@ -32,11 +32,7 @@ func (d *Daemon) ListMachines(ctx context.Context) (*contracthost.ListMachinesRe
|
||||||
|
|
||||||
machines := make([]contracthost.Machine, 0, len(records))
|
machines := make([]contracthost.Machine, 0, len(records))
|
||||||
for _, record := range records {
|
for _, record := range records {
|
||||||
reconciled, err := d.reconcileMachine(ctx, record.ID)
|
machines = append(machines, machineToContract(record))
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
machines = append(machines, machineToContract(*reconciled))
|
|
||||||
}
|
}
|
||||||
return &contracthost.ListMachinesResponse{Machines: machines}, nil
|
return &contracthost.ListMachinesResponse{Machines: machines}, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue