-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Register call_requests in background at metatx #35
Conversation
@bugout-dev check
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lg
@@ -292,15 +299,15 @@ func (c *BugoutAPIClient) FindGroup(token, groupId string) (Group, int, error) { | |||
var requestBodyBytes []byte | |||
request, requestErr := http.NewRequest("GET", fmt.Sprintf("%s/group/find?group_id=%s", c.BroodBaseURL, groupId), bytes.NewBuffer(requestBodyBytes)) | |||
if requestErr != nil { | |||
return group, 500, requestErr | |||
return group, 0, requestErr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we sending a status code 0 on error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to pass reasonable status codes back to client, so we need to proxy it. When getting 0, it means failed on waggle side, not from other API
} | ||
request.Header.Add("Authorization", fmt.Sprintf("Bearer %s", token)) | ||
request.Header.Add("Accept", "application/json") | ||
request.Header.Add("Content-Type", "application/json") | ||
|
||
response, responseErr := c.HTTPClient.Do(request) | ||
if responseErr != nil { | ||
return group, 500, requestErr | ||
return group, 0, requestErr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as above.
During operations with waggle service we notices few bottlenecks and problems:
With new PR moonstream-to/api#1062 for metatx and this one for waggle next improvements:
"metatx"
set in request body)Possible
"metatx"
values:no_metatx
- do not push call_requests to journal, sign it and return backno_check_metatx
- do not check existing call_requests before push to metatxAdditional response fields:
job_entry_id
- uuid of entry of jobjob_entry_url
- full url to job in spire