-
Notifications
You must be signed in to change notification settings - Fork 0
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
GET /classifier-jobs
able to return overlapped jobs
#626
Conversation
…` to `GET /classifier-jobs` endpoint
@@ -42,6 +42,22 @@ const Converter = require('../../common/converter') | |||
* description: Customize included fields and relations | |||
* in: query | |||
* type: array | |||
* - name: query_streams |
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 think we always use naming like:
- name: streams
- name: start
- name: end
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.
@veckatimest POST /classifier-jobs
also using these query_streams
, etc. so I think it's better to keep this naming.
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.
The code looks good to me.
core/classifier-jobs/bl/index.js
Outdated
|
||
const hours = [startRange] | ||
let nextHour = startRange | ||
while (hours.at(-1) !== endRange) { |
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.
let currentHour = startRange
const hours = [startRange]
while (currentHour !== endRange) {
currentHour += 1
if (currentHour === 24) {
currentHour = 0
}
hours.push(currentHour)
}
maybe you'll enjoy this solution (without checking the last added hour in the array)
✅ DoD
(use na when API docs (Release notes, etc) do not need to be updated)
📝 Summary
query_streams
query_start
query_end
query_hours
toGET /classifier-jobs
endpoint📸 Examples
example new params