myreplicator 1.1.19 → 1.1.20

Sign up to get free protection for your applications and to get access to all the features.
@@ -58,7 +58,7 @@ module Myreplicator
58
58
  def kill
59
59
  return false unless hostname == Socket.gethostname
60
60
  begin
61
- Process.kill('TERM', pid)
61
+ Process.kill('KILL', pid)
62
62
  self.state = "killed"
63
63
  self.save!
64
64
  rescue Errno::ESRCH
@@ -102,12 +102,18 @@ module Myreplicator
102
102
 
103
103
  if logs.count > 0
104
104
  logs.each do |log|
105
+
105
106
  time_start = log.started_at
106
107
  now = Time.now()
107
108
  if time_start + 2.hour < now
108
- Process.kill('KILL', log.pid)
109
- log.state = "killed"
110
- log.save!
109
+ begin
110
+ Process.kill('KILL', log.pid)
111
+ log.state = "killed"
112
+ log.save!
113
+ rescue Errno::ESRCH
114
+ log.state = "dead"
115
+ log.save!
116
+ end
111
117
  end
112
118
  end
113
119
  end
@@ -1,3 +1,3 @@
1
1
  module Myreplicator
2
- VERSION = "1.1.19"
2
+ VERSION = "1.1.20"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: myreplicator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.19
4
+ version: 1.1.20
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: 2013-03-27 00:00:00.000000000 Z
12
+ date: 2013-03-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -357,7 +357,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
357
357
  version: '0'
358
358
  segments:
359
359
  - 0
360
- hash: -2808785176582896659
360
+ hash: 1636857574436666365
361
361
  required_rubygems_version: !ruby/object:Gem::Requirement
362
362
  none: false
363
363
  requirements:
@@ -366,7 +366,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
366
366
  version: '0'
367
367
  segments:
368
368
  - 0
369
- hash: -2808785176582896659
369
+ hash: 1636857574436666365
370
370
  requirements: []
371
371
  rubyforge_project:
372
372
  rubygems_version: 1.8.24