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

Document which Redis commands are used #291

Merged
merged 1 commit into from
Feb 14, 2022

Conversation

vanschelven
Copy link
Contributor

See #226, #290

@vanschelven
Copy link
Contributor Author

I am "reasonably sure" that this is the full list of commands; I did the following to compose it:

  1. On redis-py (which is supposedly more or less interchangeable with aioredis, but has a list of commands that I could grep for, I ran the following incantation to get my hands on a list of Redis commands:
find redis/commands/ -name "*.py" | xargs grep 'def ' -h | sed 's/ *def //' | awk '-F(' '{print $1}' | grep -v _ | sort -u > /tmp/commands
  1. For each of those commands I ran:
if grep 'connection\.COMMAND(' channels_redis/core.py -q; then echo COMMAND; fi
if grep '\.COMMAND(' channels_redis/pubsub.py -q; then echo COMMAND; fi
  1. I ran grep -i call channels_redis/core.py and eyeballed the results for commands that are run as part of LUA scripts.

Copy link
Member

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

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

OK, great, thanks. 👍

@carltongibson carltongibson merged commit a3333fd into django:main Feb 14, 2022
@acu192
Copy link
Collaborator

acu192 commented Feb 15, 2022

Sorry I'm late for reviewing this.

RedisPubSubChannelLayer uses:

  • PUBLISH
  • SUBSCRIBE
  • UNSUBSCRIBE

@carltongibson
Copy link
Member

@acu192 — Can you add in a followup?

@acu192
Copy link
Collaborator

acu192 commented Feb 15, 2022

@carltongibson Will do. I'll merge a new PR to fix later today.

acu192 added a commit that referenced this pull request Feb 16, 2022
Followup of #291 to manually fix the auto-generated list.
dudleyhunt86 added a commit to dudleyhunt86/channels_redis-python-dev that referenced this pull request Oct 7, 2022
goldentroll added a commit to goldentroll/channels_redis that referenced this pull request Mar 14, 2023
fredfsh pushed a commit to cobalt-robotics/channels_redis that referenced this pull request Jun 20, 2023
fredfsh pushed a commit to cobalt-robotics/channels_redis that referenced this pull request Jun 20, 2023
)

Followup of django#291 to manually fix the auto-generated list.
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

3 participants