view · edit · sidebar · attach · print · history

20120703-debug-update-rss-feeds-tailbarkeit-view

<< | Index | >>


Summary

  • Debuged update_rss_feeds job.
    • found unexpected objects.
  • Create Teilbarkeit Display in Sequence View.
  • Migrate Teilbarkeit objects
    • It needs SimpleLanguage module.

Commits

Index


Debug update_rss_feeds

update_price_feeds Job run update_rss_feeds in RSSPlugin.

ch.oddb> Updater.new(self).update_price_feeds
-> undefined method `introduction_date' for #<Array:0x0000001cd81e38>
Problem

in src/view/rss/package.rb

      if(@model.sl_entry)
        components.store([2,9], :limitation)
        hash_insert_row(components, [0,10], :introduction_date)  #=> error
        hash_insert_row(css_map, [0,10,4], 'list')
        if(@model.limitation_text)
          hash_insert_row(components, [0,10], :limitation_text)
          hash_insert_row(css_map, [0,10,4], 'list')
        end 
      end

It seems that this is also Data corruption.

ch.oddb> packages.values.select{|pack|!pack.sl_entry.nil? and !pack.sl_entry.is_a? ODDB::SlEntry}.length
-> 10
ch.oddb> packages.values.select{|pack|!pack.sl_entry.nil? and !pack.sl_entry.is_a? ODDB::SlEntry}[0].sl_entry
-> [#<ODBA::Stub:247875280#74747 @odba_class=ODDB::Sequence @odba_container=247849780#28782563>]
ch.oddb> packages.values.select{|pack|!pack.sl_entry.nil? and !pack.sl_entry.is_a? ODDB::SlEntry}[1].sl_entry
-> #<ODDB::Division:0x0000001dfcc9f8>

deleted invalid data.

ch.oddb> packages.values.select{|pack|!pack.sl_entry.nil? and !pack.sl_entry.is_a? ODDB::SlEntry}.map{|pack|pack.sl_entry.odba_delete}.length
-> 10
ch.oddb> packages.values.select{|pack|!pack.sl_entry.nil? and !pack.sl_entry.is_a? ODDB::SlEntry}.length
-> 0
Result
ch.oddb> packages.values.length
-> 24866
ch.oddb> packages.values.select{|pack|pack.sl_entry.nil?}.length
-> 15462

Create Teilbarkeit display

create Tailbarkeit Display in show View of Sequence.

commit

I created View::Drugs::DivisonComposite class.

NOTE

Currently, View classes of Sequence and Package are a little complicated.
Many Admin Views and Normal Views are mixed up.
It may that We should refactor it.


migrate Teilbarkeit objects

We have to migrate model classes for multi language support.
Continue tomorrow.

  • Sequence
  • Divisibility includes SimpleLanguage
  • Division -> DivisibilityInformation
NOTE
## create Divisibility
ch.oddb> sequences.values.select{|s|!s.division.nil?}.map{|s|s.create_divisibility; s.divisibility.odba_store}.length
-> 472
## check Divisibility
ch.oddb> sequences.values.select{|s|!s.divisibility.nil?}.first.divisibility.descriptions.class
-> ODDB::SimpleLanguage::Descriptions

## create DivisibilityInformation
ch.oddb> sequences.values.select{|s|!s.divisibility.nil?}.map{|s|s.divisibility.descriptions.update_values({'de' => ODDB::DivisibilityInformation.new}).odba_store}.length
-> 472

## move text data from ODDB::Division objects
### Division.divisable
ch.oddb> sequences.values.select{|s|!s.divisibility.nil? and !s.divisibility.description('de').nil?}.map{|s|s.divisibility.description('de').divisable = s.division.divisable; s.divisibility.description('de').odba_store}.length
-> 472

### Division.dissolvable
ch.oddb> sequences.values.select{|s|!s.divisibility.nil? and !s.divisibility.description('de').nil?}.map{|s|s.divisibility.description('de').dissolvable = s.division.dissolvable; s.divisibility.description('de').odba_store}.length
-> 472
### Division.crushable
ch.oddb> sequences.values.select{|s|!s.divisibility.nil? and !s.divisibility.description('de').nil?}.map{|s|s.divisibility.description('de').crushable = s.division.crushable; s.divisibility.description('de').odba_store}.length
-> 472
### Division.openable
ch.oddb> sequences.values.select{|s|!s.divisibility.nil? and !s.divisibility.description('de').nil?}.map{|s|s.divisibility.description('de').openable = s.division.openable; s.divisibility.description('de').odba_store}.length
-> 472
### Division.notes
ch.oddb> sequences.values.select{|s|!s.divisibility.nil? and !s.divisibility.description('de').nil?}.map{|s|s.divisibility.description('de').notes = s.division.notes; s.divisibility.description('de').odba_store}.length
-> 472
### Division.source
ch.oddb> sequences.values.select{|s|!s.divisibility.nil? and !s.divisibility.description('de').nil?}.map{|s|s.divisibility.description('de').source = s.division.source; s.divisibility.description('de').odba_store}.length
-> 472
view · edit · sidebar · attach · print · history
Page last modified on July 04, 2012, at 06:35 AM