redis-helper 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/redis/helper.rb +1 -0
- data/lib/redis/helper/lock.rb +5 -0
- data/lib/redis/helper/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a25173829de39977fc53a7cbce6d410ff4b0188
|
4
|
+
data.tar.gz: f76102b37decddc2368fc6b692947992f0084fc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10c3eb2925050978170f1e0c907b5f1e0f36a0139761ed6d176a46f10fde4afd3844bf900f8b74ca00a5616c9671e73387fd826f949cb4ca3342ac040633046a
|
7
|
+
data.tar.gz: 2c06e7904f645bc008725c1df941edc9855414c5d520f02e1ec96cdbed04cbf40224a6db397f6d4a1bc1e9cd3003963896bd299698f56ad22bf6f5c24c809411
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Redis::Helper
|
1
|
+
# [Redis::Helper](https://github.com/Narazaka/redis-helper)
|
2
2
|
|
3
3
|
[![Gem](https://img.shields.io/gem/v/redis-helper.svg)](https://rubygems.org/gems/redis-helper)
|
4
4
|
[![Gem](https://img.shields.io/gem/dtv/redis-helper.svg)](https://rubygems.org/gems/redis-helper)
|
@@ -29,6 +29,8 @@ Or install it yourself as:
|
|
29
29
|
|
30
30
|
## Usage
|
31
31
|
|
32
|
+
[API Documents](http://www.rubydoc.info/gems/redis-helper/)
|
33
|
+
|
32
34
|
```ruby
|
33
35
|
class Foo < ActiveRecord::Base
|
34
36
|
include Redis::Helper
|
data/lib/redis/helper.rb
CHANGED
data/lib/redis/helper/lock.rb
CHANGED
@@ -1,9 +1,14 @@
|
|
1
1
|
class Redis
|
2
2
|
module Helper
|
3
|
+
# ロックの管理クラス
|
3
4
|
class Lock
|
4
5
|
# ロック取得のタイムアウト(sec)
|
5
6
|
DEFAULT_TIMEOUT = 5
|
6
7
|
|
8
|
+
# @param [Redis] redis redisのインスタンス
|
9
|
+
# @param [String] lock_key ロックを保持するキー
|
10
|
+
# @param [Hash] options オプション
|
11
|
+
# @option options [Integer] timeout タイムアウト時間(sec)
|
7
12
|
def initialize(redis, lock_key, options = {})
|
8
13
|
@redis = redis
|
9
14
|
@lock_key = lock_key
|
data/lib/redis/helper/version.rb
CHANGED