job_boss 0.4.2 → 0.4.3
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/MIT-LICENSE +20 -0
- data/bin/job_boss +2 -0
- data/init.rb +1 -0
- data/job_boss.gemspec +1 -1
- data/lib/job_boss/boss.rb +1 -0
- data/lib/job_boss/job.rb +2 -1
- data/lib/job_boss.rb +7 -0
- metadata +7 -4
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2010 Brian Underwood
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/bin/job_boss
CHANGED
data/init.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'job_boss'
|
data/job_boss.gemspec
CHANGED
data/lib/job_boss/boss.rb
CHANGED
data/lib/job_boss/job.rb
CHANGED
@@ -17,6 +17,7 @@ module JobBoss
|
|
17
17
|
Boss.logger.info "Dispatching Job ##{self.id}"
|
18
18
|
|
19
19
|
pid = fork do
|
20
|
+
ActiveRecord::Base.connection.reconnect!
|
20
21
|
$0 = "[job_boss] employee (job ##{self.id})"
|
21
22
|
Process.setpriority(Process::PRIO_PROCESS, 0, 19)
|
22
23
|
|
@@ -38,8 +39,8 @@ module JobBoss
|
|
38
39
|
Kernel.exit
|
39
40
|
end
|
40
41
|
end
|
41
|
-
|
42
42
|
Process.detach(pid)
|
43
|
+
ActiveRecord::Base.connection.reconnect!
|
43
44
|
end
|
44
45
|
|
45
46
|
# Store result as first and only value of an array so that the value always gets serialized
|
data/lib/job_boss.rb
ADDED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: job_boss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 3
|
10
|
+
version: 0.4.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brian Underwood
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-03 00:00:00 -05:00
|
19
19
|
default_executable: job_boss
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -71,6 +71,7 @@ extra_rdoc_files: []
|
|
71
71
|
|
72
72
|
files:
|
73
73
|
- Gemfile
|
74
|
+
- MIT-LICENSE
|
74
75
|
- README.markdown
|
75
76
|
- Rakefile
|
76
77
|
- bin/job_boss
|
@@ -103,7 +104,9 @@ files:
|
|
103
104
|
- doc/test/test_helper_rb.html
|
104
105
|
- doc/test/unit/daemon_test_rb.html
|
105
106
|
- doc/test/unit/job_test_rb.html
|
107
|
+
- init.rb
|
106
108
|
- job_boss.gemspec
|
109
|
+
- lib/job_boss.rb
|
107
110
|
- lib/job_boss/boss.rb
|
108
111
|
- lib/job_boss/capistrano.rb
|
109
112
|
- lib/job_boss/config.rb
|