ionelmc / python-redis-lock

Lock context manager implemented via redis SET NX EX and BLPOP.
https://pypi.python.org/pypi/python-redis-lock
BSD 2-Clause "Simplified" License
550 stars 78 forks source link

Simple method to test if lock with given name is applied #69

Closed mstaniszczak closed 4 years ago

mstaniszczak commented 5 years ago

PR With simple method, which allow to test if lock with given name is applied in redis.

ionelmc commented 5 years ago

Hello, can you add/extend some tests?

mstaniszczak commented 5 years ago

Ahh I missed your message - sorry. Not sure if I'll be able to do this today, but I'll try do my best at tomorrow:)

emesik commented 5 years ago

How about those tests? Would be nice to see it merged :)

ionelmc commented 5 years ago

@emesik still not seeing any commit with tests?

codecov-io commented 5 years ago

Codecov Report

Merging #69 into master will decrease coverage by 0.12%. The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #69      +/-   ##
==========================================
- Coverage   94.42%   94.29%   -0.13%     
==========================================
  Files           7        7              
  Lines         699      701       +2     
  Branches       57       57              
==========================================
+ Hits          660      661       +1     
- Misses         26       27       +1     
  Partials       13       13
Impacted Files Coverage Δ
src/redis_lock/__init__.py 92.52% <50%> (-0.5%) :arrow_down:

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 a30bd13...5cfa2f4. Read the comment docs.

mstaniszczak commented 5 years ago

After veeery long tomorrow;)

ionelmc commented 5 years ago

@mstaniszczak Hey, so I've looked a bit and it turns out most lock classes have a locked method (https://docs.python.org/3/search.html?q=locked&check_keywords=yes&area=default) - I think we should stick to that. Can you also update changelog/authors?