round_robin 1.0.0 → 1.1.0

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.
@@ -6,6 +6,9 @@ namespace :round_robin do
6
6
  task :work => :environment do
7
7
  worker = RoundRobin::Worker.new
8
8
  Process.daemon(true)
9
+ if ENV['PIDFILE']
10
+ File.open(ENV['PIDFILE'], 'w') {|f| f << worker.pid }
11
+ end
9
12
  worker.work
10
13
  end
11
14
 
@@ -9,6 +9,10 @@ module RoundRobin
9
9
  end while not shutdown
10
10
  end
11
11
 
12
+ def pid
13
+ Process.pid
14
+ end
15
+
12
16
  private
13
17
 
14
18
  def sleep_time
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: round_robin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-03-01 00:00:00.000000000Z
13
+ date: 2012-03-14 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
17
- requirement: &70225900394860 !ruby/object:Gem::Requirement
17
+ requirement: &70301459842800 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,7 +22,7 @@ dependencies:
22
22
  version: '0'
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *70225900394860
25
+ version_requirements: *70301459842800
26
26
  description: ''
27
27
  email:
28
28
  - jan.andersson@gmail.com