mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-21 08:27:02 +00:00
Unregister stateless agents from server on termination (#2606)
Closes #2027 --------- Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@@ -366,6 +366,11 @@ func (c *client) RegisterAgent(ctx context.Context, platform, backend, version s
|
||||
return res.GetAgentId(), err
|
||||
}
|
||||
|
||||
func (c *client) UnregisterAgent(ctx context.Context) error {
|
||||
_, err := c.client.UnregisterAgent(ctx, &proto.Empty{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *client) ReportHealth(ctx context.Context) (err error) {
|
||||
retry := c.newBackOff()
|
||||
req := new(proto.ReportHealthRequest)
|
||||
|
Reference in New Issue
Block a user