WIP: 103268-job-task-progress #104185
2
addon/flamenco/manager/api/worker_api.py
generated
2
addon/flamenco/manager/api/worker_api.py
generated
@ -398,7 +398,7 @@ class WorkerApi(object):
|
||||
'application/json'
|
||||
],
|
||||
'content_type': [
|
||||
'applicaton/json'
|
||||
'application/json'
|
||||
]
|
||||
},
|
||||
api_client=api_client
|
||||
|
2
addon/flamenco/manager/docs/WorkerApi.md
generated
2
addon/flamenco/manager/docs/WorkerApi.md
generated
@ -554,7 +554,7 @@ void (empty response body)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: applicaton/json
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
|
20
internal/worker/mocks/client.gen.go
generated
20
internal/worker/mocks/client.gen.go
generated
@ -1256,6 +1256,26 @@ func (mr *MockFlamencoClientMockRecorder) TaskProgressUpdateWithBodyWithResponse
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TaskProgressUpdateWithBodyWithResponse", reflect.TypeOf((*MockFlamencoClient)(nil).TaskProgressUpdateWithBodyWithResponse), varargs...)
|
||||
}
|
||||
|
||||
// TaskProgressUpdateWithResponse mocks base method.
|
||||
func (m *MockFlamencoClient) TaskProgressUpdateWithResponse(arg0 context.Context, arg1 string, arg2 api.TaskProgressUpdateJSONRequestBody, arg3 ...api.RequestEditorFn) (*api.TaskProgressUpdateResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1, arg2}
|
||||
for _, a := range arg3 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "TaskProgressUpdateWithResponse", varargs...)
|
||||
ret0, _ := ret[0].(*api.TaskProgressUpdateResponse)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// TaskProgressUpdateWithResponse indicates an expected call of TaskProgressUpdateWithResponse.
|
||||
func (mr *MockFlamencoClientMockRecorder) TaskProgressUpdateWithResponse(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1, arg2}, arg3...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TaskProgressUpdateWithResponse", reflect.TypeOf((*MockFlamencoClient)(nil).TaskProgressUpdateWithResponse), varargs...)
|
||||
}
|
||||
|
||||
// TaskUpdateWithBodyWithResponse mocks base method.
|
||||
func (m *MockFlamencoClient) TaskUpdateWithBodyWithResponse(arg0 context.Context, arg1, arg2 string, arg3 io.Reader, arg4 ...api.RequestEditorFn) (*api.TaskUpdateResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
|
35
pkg/api/openapi_client.gen.go
generated
35
pkg/api/openapi_client.gen.go
generated
@ -271,6 +271,8 @@ type ClientInterface interface {
|
||||
|
||||
// TaskProgressUpdate request with any body
|
||||
TaskProgressUpdateWithBody(ctx context.Context, taskId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||||
|
||||
TaskProgressUpdate(ctx context.Context, taskId string, body TaskProgressUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||||
}
|
||||
|
||||
func (c *Client) GetConfiguration(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||||
@ -1065,6 +1067,18 @@ func (c *Client) TaskProgressUpdateWithBody(ctx context.Context, taskId string,
|
||||
return c.Client.Do(req)
|
||||
}
|
||||
|
||||
func (c *Client) TaskProgressUpdate(ctx context.Context, taskId string, body TaskProgressUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||||
req, err := NewTaskProgressUpdateRequest(c.Server, taskId, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req = req.WithContext(ctx)
|
||||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return c.Client.Do(req)
|
||||
}
|
||||
|
||||
// NewGetConfigurationRequest generates requests for GetConfiguration
|
||||
func NewGetConfigurationRequest(server string) (*http.Request, error) {
|
||||
var err error
|
||||
@ -2804,6 +2818,17 @@ func NewTaskOutputProducedRequestWithBody(server string, taskId string, contentT
|
||||
return req, nil
|
||||
}
|
||||
|
||||
// NewTaskProgressUpdateRequest calls the generic TaskProgressUpdate builder with application/json body
|
||||
func NewTaskProgressUpdateRequest(server string, taskId string, body TaskProgressUpdateJSONRequestBody) (*http.Request, error) {
|
||||
var bodyReader io.Reader
|
||||
buf, err := json.Marshal(body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
bodyReader = bytes.NewReader(buf)
|
||||
return NewTaskProgressUpdateRequestWithBody(server, taskId, "application/json", bodyReader)
|
||||
}
|
||||
|
||||
// NewTaskProgressUpdateRequestWithBody generates requests for TaskProgressUpdate with any type of body
|
||||
func NewTaskProgressUpdateRequestWithBody(server string, taskId string, contentType string, body io.Reader) (*http.Request, error) {
|
||||
var err error
|
||||
@ -3062,6 +3087,8 @@ type ClientWithResponsesInterface interface {
|
||||
|
||||
// TaskProgressUpdate request with any body
|
||||
TaskProgressUpdateWithBodyWithResponse(ctx context.Context, taskId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TaskProgressUpdateResponse, error)
|
||||
|
||||
TaskProgressUpdateWithResponse(ctx context.Context, taskId string, body TaskProgressUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*TaskProgressUpdateResponse, error)
|
||||
}
|
||||
|
||||
type GetConfigurationResponse struct {
|
||||
@ -4726,6 +4753,14 @@ func (c *ClientWithResponses) TaskProgressUpdateWithBodyWithResponse(ctx context
|
||||
return ParseTaskProgressUpdateResponse(rsp)
|
||||
}
|
||||
|
||||
func (c *ClientWithResponses) TaskProgressUpdateWithResponse(ctx context.Context, taskId string, body TaskProgressUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*TaskProgressUpdateResponse, error) {
|
||||
rsp, err := c.TaskProgressUpdate(ctx, taskId, body, reqEditors...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ParseTaskProgressUpdateResponse(rsp)
|
||||
}
|
||||
|
||||
// ParseGetConfigurationResponse parses an HTTP response from a GetConfigurationWithResponse call
|
||||
func ParseGetConfigurationResponse(rsp *http.Response) (*GetConfigurationResponse, error) {
|
||||
bodyBytes, err := ioutil.ReadAll(rsp.Body)
|
||||
|
10
pkg/api/openapi_spec.gen.go
generated
10
pkg/api/openapi_spec.gen.go
generated
@ -215,11 +215,11 @@ var swaggerSpec = []string{
|
||||
"lhIHgpH7BBNw3EoPb36lx3QFgflQUp4qV4v7wf2Ht+FG0FVZSmUP6hXLOSWnq9J5zADFCGKUFyYnIa+k",
|
||||
"7tASR9c8OPj+dqr/+0Q35JRAOiS07V2Rqb3YrqKGy5swcyWNKZiru/GHkjwwocUCeiG1IYplmOYTaoTA",
|
||||
"flEeiNJaOACnKn2kSu0IYUJjkQ8MNgPp3Z2y/fKeJjmfMY2dTltnTJ6FNCOIwzn+5UeA88/HP/xIHCrZ",
|
||||
"QcuCCpGOg1kn8Jh5tZgIygu9Vyp2xdnSkyWusDKKp/YEqf+2YpCXnNYziWP31l3UIK6lQLQ21KdIeOh8",
|
||||
"HlUijJbQKT6XSpGa42vQLcK+GpHMu12h9ChDb82wJ2wfuExiUjJlKYql9Ve0qJi/UrAFdeVxHxur7w0i",
|
||||
"u277DI+acVudxiOe+IbLAwGy3STcn+XEex4AJf5eMcUtRa+7+wxbpZzHjQpUOjHo0+OjZjuU2OosF4tK",
|
||||
"oAYHyb2ppqKNmIjEBI7AvgprItAZtLcZGTaCsNuwyKlk4VfUmQz8+Ik0c0zdC7OA6FXnHToIhhYt7+Qk",
|
||||
"VFOJ53Cpgh9/+/j/AgAA///jSOnmIvYAAA==",
|
||||
"QcuCCpGOg1kn8Jh5tZgIygu9Vyp2xdnSkyWusDKKp/YEqf+2YpCXnNYziWP31tejQbR21KdJePB8Hl0i",
|
||||
"jJZQKj6XTpGa42tQLsK+GqHMu92h9ChDb86wJ2wfuFRiUjJlSYol9le0qJi/U7AFdeWRHzur7w0iw277",
|
||||
"DI+agVudziOe+obbAxGy3Szcn+XEux4AJf5eMcUtSa/b+wxbtZzHjRJUOjHo0+OjZj+U2OwsF4tKoAoH",
|
||||
"2b2prqKNoIjEBI7CvgprItAatLcbGXaCsNuwyKlk4VfUmQwc+Yk8c8zdC7OA7FUnHjoIhh4t7+QklFOJ",
|
||||
"53C5gh9/+/j/AgAA//9+ZK/OI/YAAA==",
|
||||
}
|
||||
|
||||
// GetSwagger returns the content of the embedded swagger specification file
|
||||
|
6
pkg/api/openapi_types.gen.go
generated
6
pkg/api/openapi_types.gen.go
generated
@ -883,6 +883,9 @@ type WorkerStateChangedJSONBody WorkerStateChanged
|
||||
// TaskUpdateJSONBody defines parameters for TaskUpdate.
|
||||
type TaskUpdateJSONBody TaskUpdate
|
||||
|
||||
// TaskProgressUpdateJSONBody defines parameters for TaskProgressUpdate.
|
||||
type TaskProgressUpdateJSONBody TaskProgressUpdate
|
||||
|
||||
// CheckBlenderExePathJSONRequestBody defines body for CheckBlenderExePath for application/json ContentType.
|
||||
type CheckBlenderExePathJSONRequestBody CheckBlenderExePathJSONBody
|
||||
|
||||
@ -937,6 +940,9 @@ type WorkerStateChangedJSONRequestBody WorkerStateChangedJSONBody
|
||||
// TaskUpdateJSONRequestBody defines body for TaskUpdate for application/json ContentType.
|
||||
type TaskUpdateJSONRequestBody TaskUpdateJSONBody
|
||||
|
||||
// TaskProgressUpdateJSONRequestBody defines body for TaskProgressUpdate for application/json ContentType.
|
||||
type TaskProgressUpdateJSONRequestBody TaskProgressUpdateJSONBody
|
||||
|
||||
// Getter for additional properties for JobMetadata. Returns the specified
|
||||
// element and whether it was found
|
||||
func (a JobMetadata) Get(fieldName string) (value string, found bool) {
|
||||
|
2
web/app/src/manager-api/manager/WorkerApi.js
generated
2
web/app/src/manager-api/manager/WorkerApi.js
generated
@ -339,7 +339,7 @@ export default class WorkerApi {
|
||||
};
|
||||
|
||||
let authNames = ['worker_auth'];
|
||||
let contentTypes = ['applicaton/json'];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = null;
|
||||
return this.apiClient.callApi(
|
||||
|
Loading…
Reference in New Issue
Block a user