djwrapper 0.0.11 → 0.0.12
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/lib/djwrapper.rb +1 -1
- data/lib/djwrapper/background_process.rb +25 -16
- metadata +2 -2
data/lib/djwrapper.rb
CHANGED
@@ -23,24 +23,33 @@ module Djwrapper
|
|
23
23
|
# class methods
|
24
24
|
##############################################################################
|
25
25
|
|
26
|
+
# --------------------------------------------------------
|
27
|
+
# sry cant get this to work for now.
|
28
|
+
#
|
29
|
+
# in an isolated test case it works fine, the signals are trapped
|
30
|
+
# and the running app is notified.
|
31
|
+
# but in conjunction with a running delayed job, somehow
|
32
|
+
# the signal doesn't end up at the delayed job.
|
33
|
+
# if we run this in console, it will also catch all Ctrl-C
|
34
|
+
# signals, which is slightly annoying.
|
26
35
|
# --------------------------------------------------------
|
27
36
|
|
28
|
-
|
29
|
-
|
30
|
-
def self.trap_handler
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
end
|
36
|
-
|
37
|
-
def self.signals
|
38
|
-
|
39
|
-
end
|
40
|
-
|
41
|
-
self.signals.each do |sig|
|
42
|
-
|
43
|
-
end
|
37
|
+
#$_djwrapper_interrupted = nil
|
38
|
+
#
|
39
|
+
#def self.trap_handler
|
40
|
+
# Proc.new do |sig|
|
41
|
+
# log("Caught #{sig} ...")
|
42
|
+
# $_djwrapper_interrupted = sig
|
43
|
+
# end
|
44
|
+
#end
|
45
|
+
#
|
46
|
+
#def self.signals
|
47
|
+
# [ "INT", "TERM" ]
|
48
|
+
#end
|
49
|
+
#
|
50
|
+
#self.signals.each do |sig|
|
51
|
+
# trap(sig, trap_handler)
|
52
|
+
#end
|
44
53
|
|
45
54
|
# --------------------------------------------------------
|
46
55
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: djwrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
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-
|
12
|
+
date: 2013-03-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: delayed_job
|