diff --git a/turbo_hipster/lib/utils.py b/turbo_hipster/lib/utils.py index cdbbc58..a7f9a5e 100644 --- a/turbo_hipster/lib/utils.py +++ b/turbo_hipster/lib/utils.py @@ -128,3 +128,7 @@ def execute_to_log(cmd, logfile, timeout=-1, process(fd) logger.info('[script exit code = %d]' % p.returncode) + +def push_file(local_file): + """ Push a log file to a server. Returns the public URL """ + pass diff --git a/turbo_hipster/task_plugins/gate_real_db_upgrade/handle_results.py b/turbo_hipster/task_plugins/gate_real_db_upgrade/handle_results.py new file mode 100644 index 0000000..3eed29a --- /dev/null +++ b/turbo_hipster/task_plugins/gate_real_db_upgrade/handle_results.py @@ -0,0 +1,30 @@ +# Copyright ... + +""" Methods to handle the results of the task. + +Primarily place the log files somewhere useful and optionally email +somebody """ + +def push_file(local_file): + """ Push a log file to a server. Returns the public URL """ + pass + +def generate_log_index(logfiles): + """ Create an index of logfiles and links to them """ + # Loop over logfile URLs + # Create summary and links + +def make_index_file(logfiles): + """ Writes an index into a file for pushing """ + generate_log_index(logfiles) + # write out to file + +def generate_push_results(logfiles): + """ Generates and pushes results """ + for logfile in logfiles: + push_file(logfile) + + index_file = make_index_file() + index_file_url = push_file(index_file) + + return index_file_url \ No newline at end of file