Several fixes
* Close response body in scaleset client * Wait for message listener loop to exit before attempting restart * Add LastMessageID field to scaleset model and function to update it Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
a2aeac731c
commit
19ba210804
12 changed files with 118 additions and 19 deletions
|
|
@ -402,6 +402,10 @@ type RunnerScaleSetMessage struct {
|
|||
Statistics *RunnerScaleSetStatistic `json:"statistics"`
|
||||
}
|
||||
|
||||
func (r RunnerScaleSetMessage) IsNil() bool {
|
||||
return r.MessageID == 0 && r.MessageType == "" && r.Body == "" && r.Statistics == nil
|
||||
}
|
||||
|
||||
func (r RunnerScaleSetMessage) GetJobsFromBody() ([]ScaleSetJobMessage, error) {
|
||||
var body []ScaleSetJobMessage
|
||||
if r.Body == "" {
|
||||
|
|
|
|||
|
|
@ -472,6 +472,8 @@ type ScaleSet struct {
|
|||
|
||||
EnterpriseID string `json:"enterprise_id,omitempty"`
|
||||
EnterpriseName string `json:"enterprise_name,omitempty"`
|
||||
|
||||
LastMessageID int64 `json:"-"`
|
||||
}
|
||||
|
||||
func (p ScaleSet) GithubEntity() (GithubEntity, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue