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

refactor(proofs): run OCR in post_save signal instead of create #549

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

raphodn
Copy link
Member

@raphodn raphodn commented Nov 6, 2024

What

Following #543

Some refactoring :

  • call the OCR async task in the model's post_save signal (instead of the API view)
  • don't run the task when running the tests (locally or in the CI) : avoids calls to Google API
  • rename run_ocr_task to fetch_and_save_ocr_data for clarification

--> similar to what we have currently with the Location & Product async tasks

@raphodn raphodn linked an issue Nov 6, 2024 that may be closed by this pull request
@raphodn raphodn changed the title refactor(proofs): run OCR in pre_save signal instead of create refactor(proofs): run OCR in post_save signal instead of create Nov 6, 2024
@raphodn raphodn merged commit f3cfa79 into main Nov 6, 2024
10 checks passed
@raphodn raphodn deleted the run-ocr-extraction-2 branch November 6, 2024 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proof: send to Google Cloud Vision, and store the matching JSON output
1 participant