rjob 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f95e67c5a4c2304306b39db54fbd9a38a934a5d47eb78763db9bd1485181ebc
4
- data.tar.gz: e69f59a709d82b346df5dcaf3037a864a7ad509898a0ea38de70f8b41611c477
3
+ metadata.gz: e13e3bdb56490d8d69d74ca45483eb53c53bbe5510d0155f1f8edabe309171ab
4
+ data.tar.gz: 9ebca9b23880e8cf3c682d9d63b8a34bd8c444873c983e5196914b0169202676
5
5
  SHA512:
6
- metadata.gz: 4be5f01c00b8f5b428366d1d049c2bda14ae76aba0ccaff38567e1d89433a534d513c1195fe01aaae5562f7499d70edb8b6431e124d31fbc385f0c67671034d2
7
- data.tar.gz: 97b94969dc9a440386a25e36db30f1712fff4f11d2a5eddd42809926509f7d13713f9271ded055e84f3d2390e998d51a2080a38d4903178155fbdf1fe5dbb5b2
6
+ metadata.gz: eb27291eb3a62b0e64ea79a21769b7ef1358d62a5bea4b47a0c2dfe90795943e6ef85c23aaa805655637771802999e7da617a689e7fdbd1fc1e1dec1178adb26
7
+ data.tar.gz: f9887d29d557888890c6f657a374d481dff1643eedaaf7f66b87b8357b51a1eb8737e929096730c55dd4e5e504f525b7b98153138ad8ee2c4b8bbd740fec50ab
data/lib/rjob/cli.rb CHANGED
@@ -9,6 +9,7 @@ class Rjob::CLI
9
9
  def initialize
10
10
  @use_rails = false
11
11
  @run_workers = false
12
+ @requires = []
12
13
  end
13
14
 
14
15
  def boot(args)
@@ -21,6 +22,10 @@ class Rjob::CLI
21
22
  require File.join(Dir.pwd, "config/environment")
22
23
  end
23
24
 
25
+ @requires.each do |r|
26
+ require r
27
+ end
28
+
24
29
  run_workers if @run_workers
25
30
  end
26
31
 
@@ -41,6 +46,8 @@ class Rjob::CLI
41
46
  @use_rails = true
42
47
  elsif arg == "--run-workers"
43
48
  @run_workers = true
49
+ elsif arg =~ /^--require=/
50
+ @requires << arg[10..-1]
44
51
  else
45
52
  puts "Unrecognized argument: #{arg}"
46
53
  puts "Exiting now"
data/lib/rjob/context.rb CHANGED
@@ -26,6 +26,7 @@ class Rjob::Context
26
26
  # :redis_pool_size - redis connection pool size. Defaults to 10
27
27
  # :prefix - defaults to "rjob"
28
28
  # :job_wrapper_proc - defaults to none
29
+ # :logger - duck-typed Logger, defaults to nil
29
30
  #
30
31
  def self.configure
31
32
  raise "Already configured!: #{@instance}" if @instance
data/lib/rjob/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Rjob
3
- VERSION = "0.4.3".freeze
3
+ VERSION = "0.4.4".freeze
4
4
  end
@@ -191,7 +191,6 @@ class Rjob::WorkerProcess
191
191
 
192
192
  begin
193
193
  @thread_pool.post do
194
-
195
194
  using_app_wrapper do
196
195
  job_processor.run
197
196
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rjob
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - André D. Piske
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-27 00:00:00.000000000 Z
11
+ date: 2021-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
159
  - !ruby/object:Gem::Version
160
160
  version: '0'
161
161
  requirements: []
162
- rubygems_version: 3.2.15
162
+ rubygems_version: 3.2.18
163
163
  signing_key:
164
164
  specification_version: 4
165
165
  summary: Asynchronous job processing