summaryrefslogtreecommitdiff
path: root/reach_reports/reach_application.rb
diff options
context:
space:
mode:
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'