<< | Index | >>
Analysing. Want to know
For running export_daily you need to pay attention to the following: When ‘export_daily’ runs, we should execute like: $> for i in {1..7}; do ruby ext/export/bin/exportd; done because ‘exportd’ automatically terminates by the ‘export_daily’ script. Note: exportd has to run for import_daily and for export_daily. If not they will both throw a #<Errno::ECONNREFUSED: Connection refused Be aware of that!
Question after investigating: csv_export collects all items locally (see method export_doctors) and delegates afterwards the generating of the csv to the EXPORT_SERVER. Why don't we execute this directly?
Create two helper scripts run_exportd_7_times and run_export_daily to correctly trace the behaviour. Waiting for result. Okay. It takes about 95 seconds between exportd starts and is really offering its service. In the exporter.rb we find a wait time of 30 seconds after each restart of the export server. Added logging via logger and a single restart procedure to simplify debugging.