store: set nodegroup last activity

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2022-12-07 11:44:33 +01:00
parent 36b5cd18e8
commit 8c47277141
7 changed files with 67 additions and 4 deletions

View File

@ -85,7 +85,7 @@ func GetNodeGroup(txn *store.Txn, dockerCli command.Cli, name string) (*store.No
}
for _, l := range list {
if l.Name == name {
return &store.NodeGroup{
ng = &store.NodeGroup{
Name: name,
Nodes: []store.Node{
{
@ -93,8 +93,11 @@ func GetNodeGroup(txn *store.Txn, dockerCli command.Cli, name string) (*store.No
Endpoint: name,
},
},
DockerContext: true,
}, nil
}
if ng.LastActivity, err = txn.GetLastActivity(ng); err != nil {
return nil, err
}
return ng, nil
}
}