sbsm 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ === 1.1.4 / 24.02.2012
2
+
3
+ * Skip the threads check process if status file is not found in the check of
4
+ * drb server threads
5
+
1
6
  === 1.1.3 / 24.02.2012
2
7
 
3
8
  * Drop crawler requests if drb server threads goes over 50
@@ -76,7 +76,6 @@ module SBSM
76
76
  private
77
77
  def lock
78
78
  lock_file = '/tmp/sbsm_lock'
79
- flag_file = '/tmp/sbsm_drop_flag'
80
79
  open(lock_file, 'a') do |st|
81
80
  st.flock(File::LOCK_EX)
82
81
  yield
@@ -86,9 +85,11 @@ module SBSM
86
85
  def drb_server_threads
87
86
  threads = 0
88
87
  status = '/var/www/oddb.org/doc/resources/downloads/status'
89
- open(status) do |file|
90
- if file.gets =~ /threads:\s+(\d+)/
91
- threads = $1.to_i
88
+ if File.exist?(status)
89
+ open(status) do |file|
90
+ if file.gets =~ /threads:\s+(\d+)/
91
+ threads = $1.to_i
92
+ end
92
93
  end
93
94
  end
94
95
  threads
@@ -133,7 +134,7 @@ module SBSM
133
134
  end
134
135
  end
135
136
  def is_drop?
136
- if unparsed_uri =~ /pointer/ or (drop_flag && is_crawler?)
137
+ if unparsed_uri =~ /pointer/ or (is_crawler? && drop_flag)
137
138
  true
138
139
  end
139
140
  end
@@ -1 +1 @@
1
- VERSION = '1.1.3'
1
+ VERSION = '1.1.4'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sbsm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-02-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdoc
16
- requirement: &21162160 !ruby/object:Gem::Requirement
16
+ requirement: &19613100 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.10'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *21162160
24
+ version_requirements: *19613100
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: hoe
27
- requirement: &21161740 !ruby/object:Gem::Requirement
27
+ requirement: &19612680 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '2.13'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *21161740
35
+ version_requirements: *19612680
36
36
  description: Application framework for state based session management
37
37
  email:
38
38
  - mhatakeyama@ywesee.com, zdavatz@ywesee.com