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

Utils: Use single class for handling locks #5838

Merged
merged 1 commit into from Apr 14, 2021
Merged

Conversation

nijel
Copy link
Member

@nijel nijel commented Apr 13, 2021

Proposed changes

Checklist

  • Lint and unit tests pass locally with my changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added documentation to describe my feature.
  • I have squashed my commits into logic units.
  • I have described the changes in the commit messages.

Other information

@nijel nijel added this to the 4.6 milestone Apr 13, 2021
@nijel nijel force-pushed the locking branch 4 times, most recently from eb071f6 to b3cfbb0 Compare April 13, 2021 10:29
- The code is now shared for repo and component level locking
- It prefers Redis based locking as that usually performs better
- The Redis locks will also nicely work in a distributed environment
  (WeblateOrg#2984)
@codecov
Copy link

codecov bot commented Apr 14, 2021

Codecov Report

Merging #5838 (9a3bfa8) into main (84ba90b) will decrease coverage by 0.00%.
The diff coverage is 72.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5838      +/-   ##
==========================================
- Coverage   91.56%   91.55%   -0.01%     
==========================================
  Files         608      609       +1     
  Lines       45778    45809      +31     
  Branches     5044     5047       +3     
==========================================
+ Hits        41917    41942      +25     
- Misses       2591     2595       +4     
- Partials     1270     1272       +2     
Impacted Files Coverage Δ
weblate/trans/exceptions.py 100.00% <ø> (ø)
weblate/trans/views/git.py 88.63% <50.00%> (ø)
weblate/utils/lock.py 66.66% <66.66%> (ø)
weblate/trans/models/component.py 82.62% <83.33%> (+0.53%) ⬆️
weblate/glossary/tasks.py 88.88% <100.00%> (ø)
weblate/trans/bulk.py 95.58% <100.00%> (ø)
weblate/trans/tasks.py 74.80% <100.00%> (-0.29%) ⬇️
weblate/vcs/base.py 92.51% <100.00%> (+0.02%) ⬆️
weblate/utils/version.py 73.91% <0.00%> (-11.09%) ⬇️
... and 10 more

@nijel nijel merged commit c5d31db into WeblateOrg:main Apr 14, 2021
@nijel nijel deleted the locking branch April 14, 2021 10:35
@nijel nijel self-assigned this Apr 14, 2021
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

1 participant