forked from release-engineering/greenwave
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use more up-to-date memcached package (release-engineering#60)
python-memcached has not beed updated in many years and we now see the following error appear everywhere in the logs (linsomniac/python-memcached#176): /venv/lib64/python3.9/site-packages/memcache.py:1304: SyntaxWarning: "is" with a literal. Did you mean "=="? if key_extra_len is 0:
- Loading branch information
Showing
7 changed files
with
42 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import uuid | ||
|
||
from dogpile.cache import make_region | ||
|
||
from greenwave.utils import sha1_mangle_key | ||
|
||
|
||
def test_cache(): | ||
cache = make_region(key_mangler=sha1_mangle_key) | ||
cache.configure( | ||
backend='dogpile.cache.pymemcache', | ||
expiration_time=5, | ||
arguments={ | ||
'url': 'localhost:11211', | ||
'distributed_lock': True, | ||
}, | ||
) | ||
key = uuid.uuid1().hex | ||
assert cache.get(key) is not True | ||
cache.set(key, True) | ||
assert cache.get(key) is True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters