cloud-crowd 0.2.5 → 0.2.6

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/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.5' # Keep version in sync with cloud-cloud.rb
4
- s.date = '2009-09-30'
3
+ s.version = '0.2.6' # Keep version in sync with cloud-cloud.rb
4
+ s.date = '2009-10-05'
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/lib/cloud-crowd.rb CHANGED
@@ -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.5'
47
+ VERSION = '0.2.6'
48
48
 
49
49
  # Increment the schema version when there's a backwards incompatible change.
50
50
  SCHEMA_VERSION = 3
@@ -55,12 +55,13 @@ module CloudCrowd
55
55
  # completion. The <tt>callback_url</tt> may include HTTP basic authentication,
56
56
  # if you like:
57
57
  # http://user:password@example.com/job_complete
58
- # If the callback_url is successfully pinged, we proceed to cleanup the job.
59
- # TODO: This should be moved into a Work Unit...
58
+ # If the callback URL returns a '201 Created' HTTP status code, CloudCrowd
59
+ # will assume that the resource has been successfully created, and the Job
60
+ # will be cleaned up.
60
61
  def fire_callback
61
62
  begin
62
- RestClient.post(callback_url, {:job => self.to_json})
63
- self.destroy
63
+ response = RestClient.post(callback_url, {:job => self.to_json})
64
+ Thread.new { self.destroy } if response && response.code == 201
64
65
  rescue RestClient::Exception => e
65
66
  puts "Failed to fire job callback. Hmmm, what should happen here?"
66
67
  end
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.5
4
+ version: 0.2.6
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-30 00:00:00 -04:00
12
+ date: 2009-10-05 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency