slurry 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/slurry +4 -0
- data/lib/slurry.rb +3 -6
- metadata +4 -4
data/bin/slurry
CHANGED
@@ -48,6 +48,10 @@ def run(options)
|
|
48
48
|
when "liaise" # Show the json around the floor
|
49
49
|
config = loadconf(configfile)
|
50
50
|
Slurry.liaise(config[:server],config[:port])
|
51
|
+
when "runonce" # Show the json around the floor
|
52
|
+
config = loadconf(configfile)
|
53
|
+
report = JSON.parse(Slurry.runonce(config[:server],config[:port]))
|
54
|
+
puts report.to_json
|
51
55
|
else # Load json data from stdin
|
52
56
|
Slurry.funnel
|
53
57
|
end
|
data/lib/slurry.rb
CHANGED
@@ -29,11 +29,11 @@ module Slurry
|
|
29
29
|
@s.puts(line)
|
30
30
|
end
|
31
31
|
|
32
|
-
#
|
33
|
-
#
|
32
|
+
# Close the open socket to the graphite server.
|
34
33
|
def close
|
35
34
|
@s.close
|
36
35
|
end
|
36
|
+
|
37
37
|
end
|
38
38
|
|
39
39
|
|
@@ -77,9 +77,7 @@ module Slurry
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def push_to_redis (data, time=Time.now.to_i)
|
80
|
-
hash =
|
81
|
-
hash[:data] = data
|
82
|
-
hash[:time] = time
|
80
|
+
hash = timestamp(data, time)
|
83
81
|
r = Redis.new
|
84
82
|
r.lpush('slurry', hash.to_json)
|
85
83
|
end
|
@@ -102,7 +100,6 @@ module Slurry
|
|
102
100
|
data = r.lrange("slurry", 0, -1)
|
103
101
|
|
104
102
|
data
|
105
|
-
|
106
103
|
end
|
107
104
|
|
108
105
|
# Dump clean out everything from redis
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slurry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -67,8 +67,8 @@ extensions: []
|
|
67
67
|
extra_rdoc_files: []
|
68
68
|
files:
|
69
69
|
- Rakefile
|
70
|
-
- bin/slurry
|
71
70
|
- bin/liaise
|
71
|
+
- bin/slurry
|
72
72
|
- lib/slurry.rb
|
73
73
|
- etc/slurry.yaml.sample
|
74
74
|
- README.md
|
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
94
|
rubyforge_project:
|
95
|
-
rubygems_version: 1.8.
|
95
|
+
rubygems_version: 1.8.24
|
96
96
|
signing_key:
|
97
97
|
specification_version: 3
|
98
98
|
summary: A tool that caches json for graphite
|