-
Notifications
You must be signed in to change notification settings - Fork 23
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
add storage functions, use phonenumbers #35
Conversation
oh. |
squashed |
i think this will be more generic. |
i donno if this is an antipattern or okay to do it this way. WDYT? |
i decided that the set should be returned as such. :) |
Thank you for the PR! Always nice to see contributions from others :) I understand the need for What do you think about the following approach: The storage class also provides the public attributes
|
Hey, Yeah, i was not sure if this would fit the style. i'll update this PR to accommodate this. |
this works like this:
WDYT? |
i have rebased the codebase and updated the deps. :) |
see #60 |
Hey,
because the current implementation of
storage.read()
orstorage.save()
do not work well when they run simultaneously i added thestorage.smembers()
andstorage.sadd()
capabilities from redis to theRedisStorage
andInMemoryStorage
classes.the later is untested, though.
smembers
- list the set of stored datasadd
- add item to the end of the existing datai have a command that fetches content from an website. this takes time.
to make sure a user never receives the same post twice i used to:
if the user runs the same command twice in a row it might happen that both coroutines read the same data and only the last one is actually saved.
now
smembers
andsadd
will handle the "append" and this eliminates the race condition.i also quickly implemented
phonenumbers
(#29)EDIT: typo