lib/main.rb in echi-converter-0.3.3 vs lib/main.rb in echi-converter-0.3.4

- old
+ new

@@ -29,16 +29,19 @@ if $config["export_type"] == 'database' || $config["export_type"] == 'both' connect_database end $init_date = Time.now -@log.info "Running..." +@log.info "ECHI-Converter daemon started with these settings:" +@log.info $config.inspect #Our Main loop loop do #Process the files - fetch_ftp_files + #fetch_ftp_files + get_ftp_files + #Grab filenames from the to_process directory after an FTP fetch, so if the #system fails it may pick up where it left off to_process_dir = $workingdir + "/../files/to_process/" #Establish where to copy the processed files to @@ -53,11 +56,11 @@ end @log.info "Processed file #{file} with #{record_cnt.to_s} records" end end - if $config["echi_update_agent_data"] == "Y" && $config["pco_process"] == "N" - process_agent_data + if $config["echi_process_dat_files"] == "Y" && $config["pco_process"] == "N" + process_dat_files end sleep $config["fetch_interval"] #Make sure we did not lose our database connection while we slept \ No newline at end of file