view · edit · sidebar · attach · print · history

20130910-export_index_therapeuticus_csv-2

<< | Index | >>


Summary

  • Fix export_index_therapeuticus_csv

Commits

Index


Fix export_index_therapeuticus_csv

Analysing. Want to know

  • Is it designed to be exiting after each export? Found the following snippet in the guide.txt
  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!
  • Is it it okay not to report any error?
  • Could/should we add a debug info when an export starts/finishes

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.

  • Question: Is it really necessary to restart the export server so many times.
view · edit · sidebar · attach · print · history
Page last modified on September 11, 2013, at 02:01 PM