cloudq 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cloudq/app.rb +5 -4
- data/lib/cloudq/job.rb +2 -2
- data/lib/cloudq/version.rb +1 -1
- data/lib/rack/params.rb +1 -0
- data/readme.md +16 -6
- metadata +24 -13
data/lib/cloudq/app.rb
CHANGED
@@ -5,7 +5,7 @@ module Cloudq
|
|
5
5
|
use Rack::Params
|
6
6
|
|
7
7
|
def self.version
|
8
|
-
"0.0.
|
8
|
+
"0.0.8"
|
9
9
|
end
|
10
10
|
|
11
11
|
aget '/' do
|
@@ -14,8 +14,9 @@ module Cloudq
|
|
14
14
|
|
15
15
|
# Post Job to the Queue
|
16
16
|
apost "/:queue" do |q|
|
17
|
-
|
18
|
-
|
17
|
+
# Rack::Params set env['params'] not params
|
18
|
+
halt 500 if env["params"]["job"].nil?
|
19
|
+
Job.create(env["params"]["job"].merge(:queue => q))
|
19
20
|
status = { :status => "success" }.to_json
|
20
21
|
body status
|
21
22
|
end
|
@@ -43,4 +44,4 @@ module Cloudq
|
|
43
44
|
end
|
44
45
|
|
45
46
|
end
|
46
|
-
end
|
47
|
+
end
|
data/lib/cloudq/job.rb
CHANGED
data/lib/cloudq/version.rb
CHANGED
data/lib/rack/params.rb
CHANGED
data/readme.md
CHANGED
@@ -40,11 +40,16 @@ Make sure you have Ruby 1.9.2 installed on your machine, if you do not have 1.9.
|
|
40
40
|
|
41
41
|
3. Install the Cloudq Gem
|
42
42
|
|
43
|
-
|
43
|
+
``` shell
|
44
|
+
gem install cloudq
|
45
|
+
```
|
46
|
+
|
44
47
|
|
45
48
|
4. Build your cloudq server
|
46
49
|
|
47
|
-
|
50
|
+
```
|
51
|
+
cloudq [your name]
|
52
|
+
```
|
48
53
|
|
49
54
|
This will create a directory and add a config.ru and Gemfile. And if you don't want to add any other features,
|
50
55
|
you are good to go. All you have to do is cd into your directory and run:
|
@@ -125,14 +130,19 @@ reserver, the worker will pull in a first in, first out process.
|
|
125
130
|
|
126
131
|
## Publish Job in Ruby
|
127
132
|
|
128
|
-
|
133
|
+
```
|
134
|
+
gem install cloudq_client
|
135
|
+
```
|
129
136
|
|
130
|
-
|
137
|
+
``` ruby
|
138
|
+
require 'cloudq_client/publish'
|
131
139
|
|
132
|
-
|
133
|
-
|
140
|
+
Cloudq::Connection.url = 'http://donuts.com'
|
141
|
+
Cloudq::Publish.new(:make_donuts).job('Donut', :types => [:glazed,
|
134
142
|
:chocolate])
|
135
143
|
|
144
|
+
```
|
145
|
+
|
136
146
|
|
137
147
|
---
|
138
148
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: cloudq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.8
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Tom Wilson
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-04-
|
13
|
+
date: 2011-04-21 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -36,7 +36,7 @@ dependencies:
|
|
36
36
|
type: :development
|
37
37
|
version_requirements: *id002
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
|
-
name:
|
39
|
+
name: rest-client
|
40
40
|
prerelease: false
|
41
41
|
requirement: &id003 !ruby/object:Gem::Requirement
|
42
42
|
none: false
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: "0"
|
47
|
-
type: :
|
47
|
+
type: :development
|
48
48
|
version_requirements: *id003
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
50
|
+
name: bundler
|
51
51
|
prerelease: false
|
52
52
|
requirement: &id004 !ruby/object:Gem::Requirement
|
53
53
|
none: false
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
type: :runtime
|
59
59
|
version_requirements: *id004
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
|
-
name:
|
61
|
+
name: thin
|
62
62
|
prerelease: false
|
63
63
|
requirement: &id005 !ruby/object:Gem::Requirement
|
64
64
|
none: false
|
@@ -69,7 +69,7 @@ dependencies:
|
|
69
69
|
type: :runtime
|
70
70
|
version_requirements: *id005
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
|
-
name:
|
72
|
+
name: sinatra
|
73
73
|
prerelease: false
|
74
74
|
requirement: &id006 !ruby/object:Gem::Requirement
|
75
75
|
none: false
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
type: :runtime
|
81
81
|
version_requirements: *id006
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
|
-
name:
|
83
|
+
name: bson_ext
|
84
84
|
prerelease: false
|
85
85
|
requirement: &id007 !ruby/object:Gem::Requirement
|
86
86
|
none: false
|
@@ -91,29 +91,29 @@ dependencies:
|
|
91
91
|
type: :runtime
|
92
92
|
version_requirements: *id007
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
|
-
name:
|
94
|
+
name: mongo_mapper
|
95
95
|
prerelease: false
|
96
96
|
requirement: &id008 !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
99
99
|
- - ">="
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version:
|
101
|
+
version: "0"
|
102
102
|
type: :runtime
|
103
103
|
version_requirements: *id008
|
104
104
|
- !ruby/object:Gem::Dependency
|
105
|
-
name:
|
105
|
+
name: eventmachine
|
106
106
|
prerelease: false
|
107
107
|
requirement: &id009 !ruby/object:Gem::Requirement
|
108
108
|
none: false
|
109
109
|
requirements:
|
110
110
|
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version:
|
112
|
+
version: 1.0.0.beta.3
|
113
113
|
type: :runtime
|
114
114
|
version_requirements: *id009
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
|
-
name:
|
116
|
+
name: async_sinatra
|
117
117
|
prerelease: false
|
118
118
|
requirement: &id010 !ruby/object:Gem::Requirement
|
119
119
|
none: false
|
@@ -123,6 +123,17 @@ dependencies:
|
|
123
123
|
version: "0"
|
124
124
|
type: :runtime
|
125
125
|
version_requirements: *id010
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: workflow
|
128
|
+
prerelease: false
|
129
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
130
|
+
none: false
|
131
|
+
requirements:
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: "0"
|
135
|
+
type: :runtime
|
136
|
+
version_requirements: *id011
|
126
137
|
description: The Cloudq Framework makes it easy to build remote job queue servers
|
127
138
|
email:
|
128
139
|
- tom@jackhq.com
|