diff options
author | mr <mr@mrautenberg.de> | 2011-06-15 13:06:20 +0200 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2011-06-15 13:06:20 +0200 |
commit | 6c43e8e019ca33b2b9fcad257d284b80b0b1fc57 (patch) | |
tree | ba3ab99eb3856728f12fcafb61e0b97ceab9ae46 /reach_reports/reach_application.rb | |
parent | 916f715ee52049a0968bc04df5aa6ca0a9a6881d (diff) |
hotfix qmrf sqlite
Diffstat (limited to 'reach_reports/reach_application.rb')
-rwxr-xr-x | reach_reports/reach_application.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/reach_reports/reach_application.rb b/reach_reports/reach_application.rb index cd0695c..9b45e8b 100755 --- a/reach_reports/reach_application.rb +++ b/reach_reports/reach_application.rb @@ -5,6 +5,20 @@ end QMRF_EDITOR_URI = "http://ortona.informatik.uni-freiburg.de/qmrfedit2/OT_QMRFEditor.jnlp" +# hack for as long as mysql lite is used +def mysql_lite_retry( n_times=15 ) + n_times.times do + begin + yield + return + rescue => ex + LOGGER.warn "datamapper error, wait and retry : "+ex.message + sleep(1+rand(3)) # wait 1-3 seconds + end + end + yield # try a last time +end + require 'reach_reports/reach_persistance.rb' require 'reach_reports/reach_service.rb' |