filbunke 2.0.6 → 2.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzM1ZDBmN2E1YWJlZTk3NDQ0MTEyNzgzOWI4OTcxMzc4ZjZiYjkwNw==
4
+ OGM0Y2M5NDc0YTE1MzAxMmIxNjNjYmJkM2EwODA4YzY5MTQ4NDFhYQ==
5
5
  data.tar.gz: !binary |-
6
- NzRiZDZhY2I1NDY3NGYxZWRhNzRlNTIyYjcxOGU1Y2JhNmEyNTA4MQ==
6
+ YjE3YzkxMzczZGIwOGFjMjFkZTYwYzc3YTUxNzk1ZTEyMGU4ZDZiMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZGM1OTUwODNkMWViODJiNzExMDgyNTgwZTNhZmIxZWMxMGRiYzZmMWM1ODhl
10
- MjdhNGExODUwN2QyNDcyYmUzMDEwYzQ4YWY2ZWNiNjcxMGYzNzIwMGI3OTcx
11
- NTUwNWFhNmU2MTJlMzJiZmM0YTI4MWQzNTRiNzAzNjMyMmFiODc=
9
+ ZTFmYzcyY2ZmNmZmOWQ3ZTFhNDEyYjJhZmU0YzZlOWI2Mzk1NTg2MGM5NGE1
10
+ OWNhODgxYTIwNTBjYTMxMWI2NGU3ZmFmOTNkNjE3MTg5ZmZmOWEyM2U5NGZi
11
+ NzI4ODQ3ZjU0ZDY1NWQ2MmM5MjI4MDVhNTI0ZjlmODc1MGU4NGQ=
12
12
  data.tar.gz: !binary |-
13
- N2EwN2Q4NGY4NjUxNTQyMTM5NDdiNGRlNmRkZmYxYTUxMWY5YmYxZDU2NzJh
14
- NGM0OGI1ZjFjNWYyMTA3ZWM0ZGU5NTk5NTM1ZGQ3ODA4OWYzMDQ2ZjgzMGZm
15
- MTlmYWZmOGVkNDRkMGE5MDM4YzdiMmIxYTJmMjhjZGI4Y2JiMWM=
13
+ ZDNiZTAwMjA3NzU1MDQ1ODE4Y2VjYmYzMTQyYzUxMDk0NDE1OTU3Yzk4ODEx
14
+ ZjY1YTFiMGNmYjgxZGVlZGU5ZGJkOWZhYzExOTUwNTdkNWRkMzVjNDU4M2Q5
15
+ ZjQ3ZWFkNjRjMzE3NjdjMGI5ZTZhN2RmNjU0NjJlZWZjOGFmZGE=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.6
1
+ 2.0.8
data/filbunke.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: filbunke 2.0.6 ruby lib
5
+ # stub: filbunke 2.0.8 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "filbunke"
9
- s.version = "2.0.6"
9
+ s.version = "2.0.8"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Wouter de Bie", "Bjorn Sperber", "Karl Ravn", "Magnus Spangdal"]
14
- s.date = "2015-09-22"
14
+ s.date = "2015-10-09"
15
15
  s.description = "Filbunke client and library"
16
16
  s.email = "technical@deltaprojects.com"
17
17
  s.executables = ["filbunked"]
@@ -27,7 +27,7 @@ module Filbunke
27
27
  failed_request_log_file_name = repository_config["failed_request_log_file_name"]||nil
28
28
 
29
29
  Client.new(repository, @logger, callbacks, failed_request_log_file_name)
30
- rescue Exception => e
30
+ rescue => e
31
31
  msg = ["#{e.class} - #{e.message}", *e.backtrace].join("\n\t")
32
32
  STDERR.puts("Failed to initialize #{repository_name}; #{msg}")
33
33
  @logger.error("Failed to initialize #{repository_name}; #{msg}")
@@ -50,7 +50,7 @@ module Filbunke
50
50
  update_checkpoint_for_repository(client.repository, new_checkpoint)
51
51
  sleep client.repository.run_every
52
52
  end
53
- rescue RuntimeError, SystemCallError, StandardError => e
53
+ rescue => e
54
54
  msg = ["#{e.class} - #{e.message}", *e.backtrace].join("\n\t")
55
55
  @logger.error("#{client.repository.name} Died.. #{msg}")
56
56
  Process.kill("KILL", @parent_pid)
@@ -86,10 +86,15 @@ module Filbunke
86
86
  end
87
87
 
88
88
  def write_pid!(pid_file_path)
89
- existing_process = ::File.read(pid_file_path) rescue nil
90
- unless existing_process.nil?
91
- @logger.info("killing existing process #{existing_process} from #{pid_file_path}")
92
- Process.kill("QUIT", existing_process.to_i) rescue nil
89
+ begin
90
+ existing_process = ::File.read(pid_file_path).to_i if ::File.readable?(pid_file_path)
91
+ if existing_process != nil and existing_process > 0
92
+ @logger.info("killing existing process #{existing_process} from #{pid_file_path}")
93
+ Process.kill("KILL", existing_process)
94
+
95
+ end
96
+ rescue => e
97
+ @logger.warn("failed to kill existing pid from #{pid_file_path}: #{e}\n\twill ignore and continue...")
93
98
  end
94
99
  ::File.open(pid_file_path, 'w') do |f|
95
100
  f.write(Process.pid.to_i)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filbunke
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wouter de Bie
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-09-22 00:00:00.000000000 Z
14
+ date: 2015-10-09 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: thoughtbot-shoulda