view · edit · sidebar · attach · print · history

20120221-update-index_rbx-sbsm-fix-ssl-err-interaction-shutdown-over_80_threads-oddb_org-update-grid_rb-htmlgrid

<< Masa.20120222-fix-grid_rg-htmlgrid-update-readme-ydpm | Index | Masa.20120220-update-crawler_pattern-drop-pointer-link-sbsm-test-heavy-access-oddb_org >>


  1. Set up apache vhost sbsm
  2. Fix Interaction SSL error oddb.org
  3. Reproduce floating data error
  4. Fix grid.rb htmlgrid

Commits
  1. Updated doc/index.rbx to load SBSM gem for Ruby 1.9 (oddb.org)
  2. Rescued OpenSSL::SSL::SSLError in interactions and interaction_detail states (oddb.org)
  3. Fix SSL error in interactions and removed rescue (oddb.org)
  4. Shutdown if more than 80 threads are created, probably because of spiders (oddb.org)
  5. Fix Grid#add method in grid.rb (htmlgrid)
  6. Removed CRAWLER_PATTERN constant from request.rb and used a local varible, crawler_pattern, in Requst#is_crawler? method (sbsm)
  7. SBSM 1.1.1 is released (oddb.org)

Set up apache vhost sbsm

Problem

  • The updates of sbsm are not applied to the online server

Commit

Note

  • doc/index.rbx is called from Apache (mod_ruby on Ruby 1.8), so this library path should be modified for Ruby 1.9

Fix Interaction SSL error oddb.org

Error

@400000004f433c8e0dd06274 error in SBSM::Session#process: /de/gcc/interactions/
@400000004f433c8e0dd06a44 OpenSSL::SSL::SSLError
@400000004f433c8e0dd06e2c SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
@400000004f433c8e0dd06e2c /usr/local/lib/ruby/1.9.1/net/http.rb:799:in `connect'
@400000004f433c8e0dd06e2c /usr/local/lib/ruby/1.9.1/net/http.rb:799:in `block in connect'
@400000004f433c8e0dd07214 /usr/local/lib/ruby/1.9.1/timeout.rb:54:in `timeout'
@400000004f433c8e0dd07214 /usr/local/lib/ruby/1.9.1/timeout.rb:99:in `timeout'
@400000004f433c8e0dd0d7a4 /usr/local/lib/ruby/1.9.1/net/http.rb:799:in `connect'

Commit

Reproduce floating data error

Problem

  • Sometimes data is corrupted and looks floating

z.B. (21/02/2012 error log)

@400000004f42b6f7019a9f24 error in SBSM::Session#to_html: /en/gcc/search/search_query/Renelix,+hom%C3%B6opathisch-spagyrische+Tropfen
@400000004f42b6f7019a9f24 NoMethodError
@400000004f42b6f7019aa6f4 undefined method `values' for "<br>":String
@400000004f42b6f7019adda4 /var/www/oddb.org/src/model/sequence.rb:241:in `public_packages'
@400000004f42b6f7019ae18c /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/stub.rb:112:in `method_missing'
@400000004f42b6f7019ae18c /var/www/oddb.org/src/model/atcclass.rb:45:in `block in active_packages'
  • src/model/package.rb#public_packages
    def public_packages
      if(public?)
        @packages.values.select { |pac| pac.public? } # <=L.241
      else
        []
      end
    end

Note

  • Sequence@packages should be a Hash
  • This should never be '<br>' (String). No method to update @packages to be '<br>' is defined in oddb.org.
  • After the rebooting of oddbd, this data floating is fixed

suspend

Fix grid.rb htmlgrid

Data Structure of Grid class

  • Grid@rows: Array of Row instances
    • Row@fields: Array of Field instances
      • Field@components: Array of an instancd of HtmlGrid class (basically Composite class is inherited)

Note

  • One HtmlGrid object has one @grid instance variable that becomes a Grid instance
  • A complicated thing is that a HtmlGrid object can contain some HtmlGrid objects (It becomes nested structure like tree structure)

Note

  • The algorithm of Grid#add in grid.rb is different from grid.c

Commit

view · edit · sidebar · attach · print · history
Page last modified on February 21, 2012, at 05:37 PM