Skip to content
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

[Task] Quart API route to cancel video processing #167

Closed
connordoman opened this issue Nov 24, 2023 · 9 comments
Closed

[Task] Quart API route to cancel video processing #167

connordoman opened this issue Nov 24, 2023 · 9 comments
Assignees
Labels
area/back-end Back-end work area/front-end Front-end work feat New feature or request

Comments

@connordoman
Copy link
Contributor

Related to #77

Description

Should the user accept/reject the video, Quart will need to be informed of this update and act accordingly.

If rejected, Quart should destroy the temporary video and free resources.

If accepted, Quart/Next.js should push the video to S3

Note: not sure about which node should forward the video to S3. My intuition says Quart since it's encapsulated but having Next.js be the coordinator is also a valid interpretation.

@connordoman connordoman added area/back-end Back-end work feat New feature or request labels Nov 24, 2023
@connordoman connordoman added this to the Term 1 Week 12 milestone Nov 24, 2023
@connordoman connordoman added the area/front-end Front-end work label Nov 24, 2023
@tthvo
Copy link
Contributor

tthvo commented Nov 24, 2023

Hey team, Quart is an internal service that will not be exposed outside. We will need to NextJS to be the proxy and forward requests to Quart. Since NextJS has access to the output directory, it can do the clean up itself so in this case, there is no need to forward it to Quart.

As for saving to S3, NextJS is the right choice. Quart server should do one and only one task: video processing.

@tthvo
Copy link
Contributor

tthvo commented Nov 24, 2023

Since NextJS has access to the output directory, it can do the clean up itself.

Now, previously we want the output to be readonly by NextJS. I suppose we should elevate it to read-write now.

@tthvo
Copy link
Contributor

tthvo commented Nov 24, 2023

What would be useful on the Quart side is that if running in stateless mode, there should be an endpoint to cancel the video processing.

@MyStackOverflows
Copy link
Contributor

so no review response routes but have a route to outright cancel the video processing?

@tthvo
Copy link
Contributor

tthvo commented Nov 24, 2023

Yehh this would be handy for UI to add a cancel button. Now, since that "cancel" endpoint is meant to be exposed. We will need to also expose a proxy route in NextJS to forward it here.

@MyStackOverflows
Copy link
Contributor

how would the cancel endpoint be any more exposed than the process video endpoint?

@tthvo
Copy link
Contributor

tthvo commented Nov 24, 2023

Not sure I understand ur question but they are both exposed to the outside world via NextJS as a proxy. In this case, clients will make request to NextJS first and must pass auth. Then, NextJS can do additional steps can call Quart.

@MyStackOverflows
Copy link
Contributor

MyStackOverflows commented Nov 24, 2023

oh okay sorry I thought you meant the actual quart route was exposed to the internet directly, didn't realize you meant through next.js via the cancel button. I'll implement that route for this issue, are we good to merge #170?

@tthvo
Copy link
Contributor

tthvo commented Nov 24, 2023

Yep. Done^^ Thanks!

@tthvo tthvo changed the title [Task] Quart API routes for acceptance/rejection of reviews [Task] Quart API route to cancel video processing Nov 24, 2023
MyStackOverflows added a commit that referenced this issue Nov 24, 2023
Signed-off-by: Paul Unger <44368989+MyStackOverflows@users.noreply.github.com>
@tthvo tthvo closed this as completed Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/back-end Back-end work area/front-end Front-end work feat New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants