officer 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +12 -12
- data/VERSION +1 -1
- data/officer.gemspec +1 -1
- metadata +1 -1
data/README.markdown
CHANGED
@@ -30,46 +30,46 @@ Run Officer in the background (production mode) and listen on a specific IP and
|
|
30
30
|
|
31
31
|
## Ruby Client
|
32
32
|
|
33
|
-
|
34
|
-
|
33
|
+
require 'rubygems'
|
34
|
+
require 'officer'
|
35
35
|
|
36
36
|
### Create a client object (defaults to localhost:11500)
|
37
37
|
|
38
|
-
|
38
|
+
client = Officer::Client.new :host => 'localhost', :port => 11500
|
39
39
|
|
40
40
|
### Lock
|
41
41
|
|
42
|
-
|
42
|
+
client.lock 'some_lock_name'
|
43
43
|
|
44
44
|
### Unlock
|
45
45
|
|
46
|
-
|
46
|
+
client.unlock 'some_lock_name'
|
47
47
|
|
48
48
|
### Wrap a block of code in a lock/unlock (with optional 5 second timeout)
|
49
49
|
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
client.with_lock('some_lock_name', :timeout => 5) do
|
51
|
+
puts 'hello world'
|
52
|
+
end
|
53
53
|
|
54
54
|
### Release all locks for this connection
|
55
55
|
|
56
|
-
|
56
|
+
client.reset
|
57
57
|
|
58
58
|
### Reconnect (all locks will be released)
|
59
59
|
|
60
|
-
|
60
|
+
client.reconnect
|
61
61
|
|
62
62
|
- Useful if you use Officer with Phusion Passenger and smart spawning. See [Passenger's documentation](http://www.modrails.com/documentation/Users%20guide%20Apache.html#_smart_spawning_gotcha_1_unintential_file_descriptor_sharing) for more information.
|
63
63
|
|
64
64
|
### Locks
|
65
65
|
|
66
|
-
|
66
|
+
client.locks
|
67
67
|
|
68
68
|
- Returns the internal state of all the server's locks.
|
69
69
|
|
70
70
|
### Connections
|
71
71
|
|
72
|
-
|
72
|
+
client.connections
|
73
73
|
|
74
74
|
- Returns the internal state of all the server's connections.
|
75
75
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
data/officer.gemspec
CHANGED