mirror of
https://github.com/getcompanion-ai/computer-host.git
synced 2026-04-18 14:02:50 +00:00
feat: ci and review fixes
This commit is contained in:
parent
2db57d0507
commit
59d3290bb9
3 changed files with 152 additions and 5 deletions
|
|
@ -233,15 +233,16 @@ func (d *Daemon) Reconcile(ctx context.Context) error {
|
|||
return err
|
||||
}
|
||||
for _, record := range records {
|
||||
if _, err := d.reconcileMachine(ctx, record.ID); err != nil {
|
||||
reconciled, err := d.reconcileMachine(ctx, record.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if record.Phase == contracthost.MachinePhaseRunning {
|
||||
if err := d.ensurePublishedPortsForMachine(ctx, record); err != nil {
|
||||
if reconciled.Phase == contracthost.MachinePhaseRunning {
|
||||
if err := d.ensurePublishedPortsForMachine(ctx, *reconciled); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
d.stopPublishedPortsForMachine(record.ID)
|
||||
d.stopPublishedPortsForMachine(reconciled.ID)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue