summaryrefslogtreecommitdiff
path: root/reach_reports/reach_application.rb
diff options
context:
space:
mode:
authormr <mr@mrautenberg.de>2011-06-15 13:06:20 +0200
committermr <mr@mrautenberg.de>2011-06-15 13:06:20 +0200
commit6c43e8e019ca33b2b9fcad257d284b80b0b1fc57 (patch)
treeba3ab99eb3856728f12fcafb61e0b97ceab9ae46 /reach_reports/reach_application.rb
parent916f715ee52049a0968bc04df5aa6ca0a9a6881d (diff)
hotfix qmrf sqlite
Diffstat (limited to 'reach_reports/reach_application.rb')
-rwxr-xr-xreach_reports/reach_application.rb14
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'