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

Create basic api for initial grabbing of unique query in background #42

Merged
merged 9 commits into from
Aug 29, 2024

Conversation

aurora-dot
Copy link
Owner

Scope

Closes #27

Implementation

Created an api app with an endpoint for searching and grabbing the initial data if it didn't exist. Used fetch on the frontend to the endpoint and using async functions wait for the data to get sent back to then redirect using js from json data response.

Error handling needs to improve however.

How to Test

  1. Go to index and search something new
  2. See loading and redirect
  3. Try another query which has already been collected previously
  4. See redirect instantly
  5. Keyboard spam and see error when searched due to no videos for query

@aurora-dot aurora-dot added bug Something isn't working enhancement New feature or request labels Aug 28, 2024
@aurora-dot aurora-dot self-assigned this Aug 28, 2024
@aurora-dot aurora-dot linked an issue Aug 28, 2024 that may be closed by this pull request
Copy link

codecov bot commented Aug 28, 2024

Codecov Report

Attention: Patch coverage is 55.55556% with 12 lines in your changes missing coverage. Please review.

Project coverage is 86.07%. Comparing base (5d3ae83) to head (530ca1a).

Files with missing lines Patch % Lines
api/views.py 50.00% 7 Missing ⚠️
api/apps.py 0.00% 4 Missing ⚠️
app/views.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #42      +/-   ##
==========================================
- Coverage   86.75%   86.07%   -0.69%     
==========================================
  Files          30       33       +3     
  Lines         468      481      +13     
==========================================
+ Hits          406      414       +8     
- Misses         62       67       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aurora-dot aurora-dot merged commit 320243f into main Aug 29, 2024
4 of 6 checks passed
@aurora-dot aurora-dot deleted the 27-make-initial-search-run-on-separate-thread branch August 29, 2024 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make initial search run on separate thread
1 participant