-
Notifications
You must be signed in to change notification settings - Fork 105
Add cancel task api for v0.30.0 #395
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
Changes from 1 commit
478217b
6d8eaed
d629950
c41800e
d6bce8a
15f1b43
d4c6242
a55baa0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -144,7 +144,7 @@ type TaskInfo struct { | |||||||||||||||||||||||||||||||||||||||||||||
| EnqueuedAt time.Time `json:"enqueuedAt"` | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| // TasksQuery is the request body for list documents method | ||||||||||||||||||||||||||||||||||||||||||||||
| // TasksQuery is a list of filter available to send as query parameters | ||||||||||||||||||||||||||||||||||||||||||||||
| type TasksQuery struct { | ||||||||||||||||||||||||||||||||||||||||||||||
| UIDS []int64 | ||||||||||||||||||||||||||||||||||||||||||||||
| Limit int64 | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -161,6 +161,18 @@ type TasksQuery struct { | |||||||||||||||||||||||||||||||||||||||||||||
| AfterFinishedAt time.Time | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| // CancelTasksQuery is a list of filter available to send as query parameters | ||||||||||||||||||||||||||||||||||||||||||||||
| type CancelTasksQuery struct { | ||||||||||||||||||||||||||||||||||||||||||||||
| UIDS []int64 | ||||||||||||||||||||||||||||||||||||||||||||||
| IndexUIDS []string | ||||||||||||||||||||||||||||||||||||||||||||||
| Statuses []string | ||||||||||||||||||||||||||||||||||||||||||||||
| Types []string | ||||||||||||||||||||||||||||||||||||||||||||||
| BeforeEnqueuedAt time.Time | ||||||||||||||||||||||||||||||||||||||||||||||
| AfterEnqueuedAt time.Time | ||||||||||||||||||||||||||||||||||||||||||||||
| BeforeStartedAt time.Time | ||||||||||||||||||||||||||||||||||||||||||||||
| AfterStartedAt time.Time | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+165
to
+174
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't add those two filters because they didn't make sense, and they are not in the parameters available in the documentation. Are you sure it's a good think to add it? |
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| type Details struct { | ||||||||||||||||||||||||||||||||||||||||||||||
| ReceivedDocuments int64 `json:"receivedDocuments,omitempty"` | ||||||||||||||||||||||||||||||||||||||||||||||
| IndexedDocuments int64 `json:"indexedDocuments,omitempty"` | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
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.
Can you make this function
encodeTasksQuerysupport multiple sets of params?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.
Not really, I could put
interface{}as a parameter instead of a typed struct, but I wouldn't have access to the fields easily.