creeper 1.0.8 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/creeper.rb +37 -4
  2. data/lib/creeper/version.rb +1 -1
  3. metadata +1 -1
@@ -26,9 +26,6 @@ module Creeper
26
26
 
27
27
  ## default configuration ##
28
28
 
29
- @beanstalk_url = ENV['BEANSTALK_URL'] || 'beanstalk://127.0.0.1/'
30
- @err_logger = ::Logger.new($stderr)
31
- @out_logger = ::Logger.new($stdout)
32
29
  @patience_soft = 60
33
30
  @patience_hard = 30
34
31
  @pool_size = 2
@@ -44,7 +41,43 @@ module Creeper
44
41
  ## configuration ##
45
42
 
46
43
  attr_reader :lock
47
- attr_accessor :beanstalk_url, :error_logger, :logger, :patience_soft, :patience_hard, :pool_size, :reserve_timeout, :retry_count
44
+ attr_accessor :patience_soft, :patience_hard, :pool_size, :reserve_timeout, :retry_count
45
+
46
+ def beanstalk_url
47
+ lock.synchronize do
48
+ @beanstalk_url ||= ENV['BEANSTALK_URL'] || 'beanstalk://127.0.0.1/'
49
+ end
50
+ end
51
+
52
+ def beanstalk_url=(beanstalk_url)
53
+ lock.synchronize do
54
+ @beanstalk_url = beanstalk_url
55
+ end
56
+ end
57
+
58
+ def err_logger
59
+ lock.synchronize do
60
+ @err_logger ||= ::Logger.new($stderr)
61
+ end
62
+ end
63
+
64
+ def err_logger=(err_logger)
65
+ lock.synchronize do
66
+ @err_logger = err_logger
67
+ end
68
+ end
69
+
70
+ def out_logger
71
+ lock.synchronize do
72
+ @out_logger ||= ::Logger.new($stdout)
73
+ end
74
+ end
75
+
76
+ def out_logger=(out_logger)
77
+ lock.synchronize do
78
+ @out_logger = out_logger
79
+ end
80
+ end
48
81
 
49
82
  def worker_pool
50
83
  lock.synchronize do
@@ -1,3 +1,3 @@
1
1
  module Creeper
2
- VERSION = "1.0.8"
2
+ VERSION = "1.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: creeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: