Created
June 3, 2009 16:22
-
-
Save christianromney/123072 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'config/environment' | |
def create_reports | |
DAS_SERVERS.each do |server| | |
report = SubmitTerminationReport.publish(server, :log => STATE_LOG); | |
write_file(report, server, SUBMIT_TERM_PREFIX) | |
report = ActivateDeviceReport.publish(server, :log => DAO_LOG); | |
write_file(report, server, ACTIVATE_DEVICE_PREFIX) | |
report = AddDeviceReport.publish(server, :log => DAO_LOG); | |
write_file(report, server, ADD_DEVICE_PREFIX) | |
report = OrderReport.publish(server, :log => GENERAL_LOG); | |
write_file(report, server, ORDER_PREFIX) | |
end | |
end | |
# Move this to report | |
def write_file(report, server, prefix) | |
open ("#{REPORTS_DIR}/#{server}/#{prefix}.#{PROCESS_DATE}.dat", "w") do |f| | |
f << report | |
end | |
#combine_files | |
end | |
def combine_files | |
#combine the reports here... | |
#if its the first file, print the header, if not, strip the header, etc... | |
end | |
create_reports |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment