<< | Index | >>
suspend
after the reboot oddbd (first, check if @app.update is possible or not via DRb server)
suspend
suspend
Checked 23943 packages Updated in trade (out_of_trade:false): 0 packages Updated out of trade (out_of_trade:true) : 12945 packages Updated pharmacode: 0 packages Deleted pharmacode: 13168 packages
Note
Run locally and check log
Resolved
Commit
Problem
Commit
#!/usr/bin/env ruby # Swissmedicd -- oddb.org -- 08.07.2011 -- mhatakeyama@ywesee.com $: << File.expand_path("../src", File.dirname(__FILE__)) require 'drb/drb' require 'swissmedic' uri = ODDB::Swissmedic::URI DRb.start_service(uri, ODDB::Swissmedic) DRb.thread.join
#!/usr/bin/ruby # encoding: utf-8 # ODDB::Swissmedic::Updater -- 08.07.2011 -- mhatakeyama@ywesee.com require 'rubygems' require 'drb' module ODDB module Swissmedic URI = 'druby://localhost:60001' def Swissmedic.session yield(ODDB::Swissmedic::Updater.new) end class Updater include DRb::DRbUndumped def test 'test' end end end # Swissmedic end # ODDB
require 'plugin/swissmedic_updater'
#!/usr/bin/env ruby # ODDB::SwissmedicUpdaterPlugin -- oddb.org -- 11.07.2011 -- mhatakeyama@ywesee.com require 'plugin/plugin' require 'drb' require 'ext/swissmedic/src/swissmedic' module ODDB class SwissmedicUpdaterPlugin < Plugin SWISSMEDIC_SERVER = DRbObject.new(nil, ODDB::Swissmedic::URI) def test SWISSMEDIC_SERVER.session do |server| server.test end end def report lines = [ nil ] lines.join("\n") end end end # ODDB
Run
ch.oddb> ODDB::SwissmedicUpdaterPlugin.new(self).test -> test
Note
Next
Note
etc/swissmedic/src/swissmedic.rb#test
def test agent = Mechanize.new page = agent.get "http://ywesee.com" end
Run
ch.oddb> ODDB::SwissmedicUpdaterPlugin.new(self).test -> /usr/lib64/ruby/1.8/drb/drb.rb:570:in `load': connection closed
Experiment
def test agent = Mechanize.new.extend(DRb::DRbUndumped) page = agent.get("http://ywesee.com") end
Result
masa@masa ~/ywesee/oddb.org $ bin/admin ch.oddb> ODDB::SwissmedicUpdaterPlugin.new(self).test -> /usr/lib64/ruby/1.8/drb/drb.rb:570:in `load': connection closed ch.oddb> ODDB::SwissmedicUpdaterPlugin.new(self).test -> /usr/lib64/ruby/1.8/drb/drb.rb:570:in `load': connection closed ch.oddb> ODDB::SwissmedicUpdaterPlugin.new(self).test -> #<Mechanize::Page:0x7ff0f83fb178> ch.oddb> ODDB::SwissmedicUpdaterPlugin.new(self).test -> #<Mechanize::Page:0x7ff0f83e9a40> ch.oddb> ODDB::SwissmedicUpdaterPlugin.new(self).test -> #<Mechanize::Page:0x7ff0f83d8308>
Note
suspend
this probelm
Experiment
def test start_time = Time.new agent = Mechanize.new target = get_latest_file(agent, 'Packungen') if(target) initialize_export_registrations(agent) keep_active_registrations_praeparateliste diff target, @latest, [:atc_class, :sequence_date] end end
Run
ch.oddb> ODDB::SwissmedicUpdaterPlugin.new(self).test -> (druby://localhost:60001) /usr/lib64/ruby/gems/1.8/gems/spreadsheet-0.6.5.0/lib/spreadsheet.rb:68:in `initialize': No such file or directory - /home/masa/work/Packungen-latest.xls
Note
suspend
this problem