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

api: Create strongConsistency option in task&asset APIs #1524

Merged
merged 2 commits into from
Dec 5, 2022

Conversation

victorges
Copy link
Member

What does this pull request do? Explain your changes. (required)

This is necessary for task-runner as it requests the objects almost
immediately after they are creatd. Sometimes rabbit is quicker than the DB.

Specific updates (required)

  • Create strongConsistency query string which, when set to true, avoids using the replica to read the objects

-

  • How did you test each of these updates (required)
    yarn test

Does this pull request close any open issues?

No.

Checklist:

  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

This is necessary for task-runner as it requests the objects
almost immediately after they are creatd. Sometimes rabbit is
quicker than the DB.
@victorges victorges requested a review from a team as a code owner December 4, 2022 08:03
@vercel
Copy link

vercel bot commented Dec 4, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
livepeer-studio ✅ Ready (Inspect) Visit Preview Dec 4, 2022 at 8:15AM (UTC)

@codecov
Copy link

codecov bot commented Dec 4, 2022

Codecov Report

Merging #1524 (99a614e) into master (dc63250) will increase coverage by 0.11940%.
The diff coverage is 100.00000%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##              master       #1524         +/-   ##
===================================================
+ Coverage   53.00353%   53.12293%   +0.11940%     
===================================================
  Files             68          68                 
  Lines           4528        4531          +3     
  Branches         852         853          +1     
===================================================
+ Hits            2400        2407          +7     
+ Misses          1820        1817          -3     
+ Partials         308         307          -1     
Impacted Files Coverage Δ
packages/api/src/controllers/asset.ts 58.89968% <100.00000%> (ø)
packages/api/src/controllers/helpers.ts 50.31847% <100.00000%> (+0.96782%) ⬆️
packages/api/src/controllers/task.ts 21.69811% <100.00000%> (ø)
packages/api/src/webhooks/cannon.ts 49.70760% <0.00000%> (+2.33918%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dc63250...99a614e. Read the comment docs.

Impacted Files Coverage Δ
packages/api/src/controllers/asset.ts 58.89968% <100.00000%> (ø)
packages/api/src/controllers/helpers.ts 50.31847% <100.00000%> (+0.96782%) ⬆️
packages/api/src/controllers/task.ts 21.69811% <100.00000%> (ø)
packages/api/src/webhooks/cannon.ts 49.70760% <0.00000%> (+2.33918%) ⬆️

Copy link
Member

@gioelecerati gioelecerati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Of course a rabbit is faster

@victorges victorges merged commit 3bb7e90 into master Dec 5, 2022
@victorges victorges deleted the vg/feat/strong-consistency-vod branch December 5, 2022 22:34
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.

None yet

2 participants