bmc-daemon-lib 0.10.3 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bmc-daemon-lib.gemspec +2 -2
- data/lib/bmc-daemon-lib/logger.rb +1 -1
- data/lib/bmc-daemon-lib/worker.rb +2 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e310d3a2ec000411286ea62a49815223b2f9e43
|
4
|
+
data.tar.gz: 9c9d16f29b9d121ccc20717012c2b7fee401b032
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f47929c8cdcff98598bc491327eb54ccce4e0d84c48d8c8f25ab6db7901100beac4b150c051059212b79372558dc20b8036036fc5f43af3501e17fca9736e5f3
|
7
|
+
data.tar.gz: f625227ac059b003c4680bbf3d83268931aa756c76577e42e0fc0bb9e952bd90b6df5b43269a0d88626f03f1b2d2f4f99b1905440d0b7016f3245e7975ad9bcd
|
data/bmc-daemon-lib.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
Gem::Specification.new do |spec|
|
3
3
|
# Project version
|
4
|
-
spec.version = "0.
|
4
|
+
spec.version = "0.11.0"
|
5
5
|
|
6
6
|
# Project description
|
7
7
|
spec.name = "bmc-daemon-lib"
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.email = "opensource@bmconseil.com"
|
10
10
|
spec.description = "Shared utilities to build a daemon: logger, configuration, helpers"
|
11
11
|
spec.summary = spec.description
|
12
|
-
spec.homepage
|
12
|
+
spec.homepage = "http://github.com/bmedici/#{spec.name}"
|
13
13
|
spec.licenses = ["MIT"]
|
14
14
|
spec.date = Time.now.strftime("%Y-%m-%d")
|
15
15
|
|
@@ -10,6 +10,7 @@ module BmcDaemonLib
|
|
10
10
|
STATUS_FINISHED = "finished"
|
11
11
|
STATUS_CRASHED = "crashed"
|
12
12
|
STATUS_TIMEOUT = "timeout"
|
13
|
+
STATUS_DOWN = "down"
|
13
14
|
|
14
15
|
# Class options
|
15
16
|
attr_reader :pool
|
@@ -57,16 +58,6 @@ module BmcDaemonLib
|
|
57
58
|
sleep seconds
|
58
59
|
end
|
59
60
|
|
60
|
-
def working_on_job(job, working_on_it = false)
|
61
|
-
if working_on_it
|
62
|
-
job.wid = Thread.current.thread_variable_get :wid
|
63
|
-
Thread.current.thread_variable_set :jid, job.id
|
64
|
-
else
|
65
|
-
job.wid = nil
|
66
|
-
Thread.current.thread_variable_set :jid, nil
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
61
|
def start_loop
|
71
62
|
log_info "start_loop starting", @config
|
72
63
|
loop do
|
@@ -81,7 +72,7 @@ module BmcDaemonLib
|
|
81
72
|
worker_sleep @config[:timer]
|
82
73
|
|
83
74
|
rescue StandardError => e
|
84
|
-
log_error "WORKER EXCEPTION: #{e.inspect}"
|
75
|
+
log_error "WORKER EXCEPTION: #{e.inspect}", e.backtrace
|
85
76
|
sleep 1
|
86
77
|
end
|
87
78
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bmc-daemon-lib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bruno MEDICI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|