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

Let lock to use redis_options method #262

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

glasses618
Copy link

I encountered the same issue as #157 solved, but is for lock method.
I am not sure why #157 didn't let lock to use redis_options, but I think it should be.

This PR introduce redis_options on lock methods and add some test cases.
P.S. I didn't add test case on sorted_set because it didn't have any options yet.

class Roster
include Redis::Objects
counter :available_slots, :start => 10
counter :pitchers, :limit => :max_pitchers
counter :basic
hash_key :contact_information, :marshal_keys=>{'updated_at'=>true}
lock :resort, :timeout => 2
value :starting_pitcher, :marshal => true
list :player_stats, :marshal => true
set :outfielders, :marshal => true
sorted_set :rank

@codecov
Copy link

codecov bot commented Sep 18, 2021

Codecov Report

Merging #262 (e475d14) into master (054c537) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #262   +/-   ##
=======================================
  Coverage   98.83%   98.83%           
=======================================
  Files          19       19           
  Lines         944      944           
=======================================
  Hits          933      933           
  Misses         11       11           
Impacted Files Coverage Δ
lib/redis/objects/locks.rb 97.14% <ø> (ø)

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 054c537...e475d14. Read the comment docs.

@glasses618 glasses618 changed the title Let lock to use redis_options Let lock to use redis_options method Sep 18, 2021
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.

1 participant