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

Add a development console #117

Merged
merged 1 commit into from
Jul 6, 2023
Merged

Conversation

lewispb
Copy link
Contributor

@lewispb lewispb commented Jul 3, 2023

Access with bin/console. A Redis connection and logger is set up, Kredis is required and the data structures can be explored.

➜  kredis git:(development-console) bin/console
>> ordered_set = Kredis.ordered_set "myorderedset"
  Kredis  (0.3ms)  Connected to shared
=>
#<Kredis::Types::OrderedSet:0x00000001348609b8
...
>> ordered_set.append(%w[ 2 3 4 ])
  Kredis Proxy (0.2ms)  ZADD myorderedset [1688371632.553873, "2", 1688371632.553885, "3", 1688371632.553889, "4"]
=> [0]
>> ordered_set.elements
  Kredis Proxy (1.4ms)  ZRANGE myorderedset [0, -1]
=> ["2", "3", "4"]

Access with `bin/console`. A Redis connection and logger is set up,
Kredis is required and the data structures can be explored.
end


Kredis.configurator = Class.new { def config_for(name) { db: "2" } end }.new
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test suite helper configures db 1, so using db 2 here to avoid conflicts.

@jeremy jeremy merged commit 92cd3d4 into rails:main Jul 6, 2023
16 checks passed
@jeremy jeremy deleted the development-console branch July 6, 2023 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants