-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat: upload user files #216
Conversation
deployed preview: https://216.connect-d5y.pages.devWelcome to connect! Make sure to:
Mobile
Desktop
|
4eeb57c
to
30aef77
Compare
we should have a backlog item for defining style in Biome to ensure things like line wrapping and quotes are consistent not super big deal, but it'll help avoid you having to make small nit commits on everyone's PRs 😄 |
Not counting blank lines in the lint count means we don't need to be super aggressive anymore 🙂 |
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.
We should have the "upload all segments" button in this PR so that is isn't just adding unused code 😄
This PR stills adds lots of methods and types for the upload queue. Normally I would try to split PRs along the line of features rather than "backend" and UI like this, but I'm fine with leaving this stuff here in this case if you want to
The next PR should add the upload queue
sounds great! |
Co-authored-by: Cameron Clough <[email protected]>
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.
Just style changes 😅
Will try and get the Biome formatter setup
const fileTypesToUpload = buttonToFileTypeMap[type] | ||
|
||
try { | ||
await uploadAllSegments(props.routeName, route.segment_numbers.length, fileTypesToUpload) |
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.
We only added routes_segments to get maxqlog? We're trying to deprecate it
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.
is this written in documentation somewhere?
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.
happy to change it
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.
d["segment_numbers"] = list(range(0, r.maxqlog+1))
we can just use this
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'll patch this
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.
Added in #216 from `routes_segments` API: ``` for row in q.all(): d["start_time_utc_millis"] = int((0 if r.start_time is None else r.start_time.timestamp()) * 1000) d["end_time_utc_millis"] = int((0 if r.end_time is None else r.end_time.timestamp()) * 1000) # TODO: remove these once connect doesn't use them d["segment_numbers"] = list(range(0, r.maxqlog+1)) d["segment_start_times"] = [d["start_time_utc_millis"]+(i*60*1000) for i in range(r.maxqlog+1)] d["segment_end_times"] = [min(d["segment_start_times"][i]+(60*1000), d["end_time_utc_millis"]) for i in range(r.maxqlog+1)] res[r.fullname] = d return jsonify(list(res.values())) ```
closes #51
keeping in mind the LoC limits, minimized some lines in nearby APIs