<< | Index | >>
suspend
suspend
suspend
Experiment
src/util/updater.rb#update_bsv
return_value_plug_update = nil wrap_update(klass, subj) { return_value_plug_update = plug.update LogFile.append('oddb/debug', " return_value_BsvXmlPlugin.update = " + return_value_plug_update.inspect.to_s, Time.now) #if plug.update if return_value_plug_update log_notify_bsv(plug, this_month, subj) end } return return_value_plug_update end
Run
Run
Result
log/oddb/debug/2011/01.log
... 2011-01-13 09:25:24 CET return_value_BsvXmlPlugin.update = "/home/masa/ywesee/oddb.org/data/xml/XMLPublications-2011.01.13.zip" ... 2011-01-13 09:25:47 CET getin Net::SMTP 2011-01-13 09:25:47 CET recipient=mhatakeyama@ywesee.com 2011-01-13 09:25:50 CET the first log.notify end ... 2011-01-13 09:25:50 CET getin Net::SMTP 2011-01-13 09:25:50 CET recipient=mhatakeyama@ywesee.com 2011-01-13 09:25:53 CET the second log.notify end ... 2011-01-13 09:25:53 CET getin update_bsv_followers
Note
Next
src/util/updater.rb#update_swissmedic
def update_swissmedic(*args) logs_pointer = Persistence::Pointer.new([:log_group, :swissmedic]) logs = @app.create(logs_pointer) klass = SwissmedicPlugin plug = klass.new(@app) return_value_plug_update = nil wrap_update(klass, "swissmedic") { #if(plug.update(*args)) if(return_value_plug_update = plug.update(*args)) month = @@today << 1 pointer = logs.pointer + [:log, Date.new(month.year, month.month)] log = @app.update(pointer.creator, log_info(plug)) log.notify('Swissmedic XLS') end } return return_value_plug_update end
Reboot bin/oddbd
Run jobs/import_swissmedic
Result
log/oddb/debug/2011/01.log
... 2011-01-13 09:43:18 CET getin Net::SMTP 2011-01-13 09:43:18 CET recipient=mhatakeyama@ywesee.com 2011-01-13 09:43:19 CET getin update_swissmedic_followers
Note
Commit
Note
Memo
masa@masa-VirtualBox:/media/VBOXADDITIONS_4.0.0_69151$ sh autorun.sh
masa@masa-VirtualBox:~$ su passwd postgres masa@masa-VirtualBox:~$ su postgres postgres@masa-VirtualBox:/home/masa$ createdb testdb postgres@masa-VirtualBox:/home/masa$ psql testdb testdb=# \l testdb=# \q
sudo apt-get install patch
sudo apt-get install vim
~/src$ tar zxvf ruby-1.8.6-p369.tar.gz ~/src$ tar zxvf oniguruma_patch_for_ruby-1.8.6_p369.20100615_from_Hannes-san.tar.gz ~/src$ cd oniguruma/ ~/src/oniguruma$ ./configure --with-rubydir=/home/masa/src/ruby-1.8.6-p369 ~/src/oniguruma$ make 186 ~/src/oniguruma$ cd ../ruby-1.8.6-p369/ ~/src/ruby-1.8.6-p369$ mkdir ~/bin ~/src/ruby-1.8.6-p369$ ./configure --prefix=/home/masa/bin ~/src/ruby-1.8.6-p369$ make ~/src/ruby-1.8.6-p369$ make install
~$ vim ~/.bashrc export PATH=$PATH:/home/masa/bin/bin ~$ source ~/.bashrc
~$ ruby -v ruby 1.8.6 (2009-06-08 patchlevel 369) [i686-linux]
~$ sudo apt-get install rubygems1.8
~$ gem -v 1.3.7
~$ gem list *** LOCAL GEMS ***
~$ vim ~/.bashrc export PATH=$PATH:/home/masa/bin/bin:/var/lib/gems/1.8/bin ~$ source .bashrc
~$ sudo gem install de.oddb ~$ sudo gem install rclconf
suspend
mod_ruby source code
Installer
Setting
It Works!
Note
Reference
Note
Change hosts
127.0.0.1 localhost vhost.localhost