cloud-crowd 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/cloud-crowd.gemspec +2 -2
- data/config/database.example.yml +2 -1
- data/lib/cloud-crowd.rb +2 -2
- data/lib/cloud_crowd/command_line.rb +2 -5
- data/lib/cloud_crowd/models/work_unit.rb +1 -1
- metadata +2 -2
data/cloud-crowd.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'cloud-crowd'
|
3
|
-
s.version = '0.2.
|
4
|
-
s.date = '2009-09-
|
3
|
+
s.version = '0.2.5' # Keep version in sync with cloud-cloud.rb
|
4
|
+
s.date = '2009-09-30'
|
5
5
|
|
6
6
|
s.homepage = "http://wiki.github.com/documentcloud/cloud-crowd"
|
7
7
|
s.summary = "Parallel Processing for the Rest of Us"
|
data/config/database.example.yml
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# This is a standard ActiveRecord database.yml file. You can configure it
|
2
|
-
# to use any database that ActiveRecord supports.
|
2
|
+
# to use any database that ActiveRecord supports. Only the central server needs
|
3
|
+
# this file to be configured -- nodes never connect directly to the database.
|
3
4
|
|
4
5
|
:adapter: mysql
|
5
6
|
:encoding: utf8
|
data/lib/cloud-crowd.rb
CHANGED
@@ -21,11 +21,11 @@ autoload :JSON, 'json'
|
|
21
21
|
autoload :RestClient, 'restclient'
|
22
22
|
autoload :RightAws, 'right_aws'
|
23
23
|
autoload :Sinatra, 'sinatra'
|
24
|
-
autoload :Socket, 'socket'
|
25
24
|
autoload :Thin, 'thin'
|
26
25
|
autoload :YAML, 'yaml'
|
27
26
|
|
28
27
|
# Common code which should really be required in every circumstance.
|
28
|
+
require 'socket'
|
29
29
|
require 'cloud_crowd/exceptions'
|
30
30
|
|
31
31
|
module CloudCrowd
|
@@ -44,7 +44,7 @@ module CloudCrowd
|
|
44
44
|
autoload :WorkUnit, 'cloud_crowd/models'
|
45
45
|
|
46
46
|
# Keep this version in sync with the gemspec.
|
47
|
-
VERSION = '0.2.
|
47
|
+
VERSION = '0.2.5'
|
48
48
|
|
49
49
|
# Increment the schema version when there's a backwards incompatible change.
|
50
50
|
SCHEMA_VERSION = 3
|
@@ -98,10 +98,9 @@ Options:
|
|
98
98
|
|
99
99
|
# `crowd node` can either 'start', 'stop', or 'restart'.
|
100
100
|
def run_node(subcommand)
|
101
|
-
ensure_config
|
102
101
|
load_code
|
103
|
-
|
104
|
-
case subcommand
|
102
|
+
ENV['RACK_ENV'] = @options['environment']
|
103
|
+
case (subcommand || 'start')
|
105
104
|
when 'start' then start_node
|
106
105
|
when 'stop' then stop_node
|
107
106
|
when 'restart' then restart_node
|
@@ -111,8 +110,6 @@ Options:
|
|
111
110
|
# Launch a Node. Please only run a single node per machine. The Node process
|
112
111
|
# will be long-lived, although its workers will come and go.
|
113
112
|
def start_node
|
114
|
-
ENV['RACK_ENV'] = @options['environment']
|
115
|
-
load_code
|
116
113
|
port = @options[:port] || Node::DEFAULT_PORT
|
117
114
|
puts "Starting CloudCrowd Node on port #{port}..."
|
118
115
|
Node.new(port, @options[:daemonize])
|
@@ -46,7 +46,7 @@ module CloudCrowd
|
|
46
46
|
work_units.push(unit)
|
47
47
|
end
|
48
48
|
ensure
|
49
|
-
WorkUnit.cancel_reservations(reservation_number)
|
49
|
+
WorkUnit.cancel_reservations(reservation_number) if reservation_number
|
50
50
|
end
|
51
51
|
|
52
52
|
# Reserves all available WorkUnits for this process. Returns false if there
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloud-crowd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Ashkenas
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-30 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|