From a378ef71ec960ed3ecdf7151cd9685fb24dec136 Mon Sep 17 00:00:00 2001 From: Ciaran McCreesh Date: Thu, 2 Sep 2010 10:14:26 +0100 Subject: Don't show (no output for) when one job --- src/clients/cave/cmd_execute_resolution.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/clients/cave/cmd_execute_resolution.cc b/src/clients/cave/cmd_execute_resolution.cc index 362a28777..dab4d3b97 100644 --- a/src/clients/cave/cmd_execute_resolution.cc +++ b/src/clients/cave/cmd_execute_resolution.cc @@ -1184,6 +1184,7 @@ namespace { const std::shared_ptr env; const ExecuteResolutionCommandLine & cmdline; + const Executor & executor; const int n_fetch_jobs; const std::shared_ptr job; const std::shared_ptr lists; @@ -1203,6 +1204,7 @@ namespace ExecuteJobExecutive( const std::shared_ptr & e, const ExecuteResolutionCommandLine & c, + const Executor & x, const int n, const std::shared_ptr & j, const std::shared_ptr & l, @@ -1213,6 +1215,7 @@ namespace std::string & h) : env(e), cmdline(c), + executor(x), n_fetch_jobs(n), job(j), lists(l), @@ -1378,9 +1381,12 @@ namespace } else { - cout << fuc(fs_output_heading(), fv<'h'>(heading)); - old_heading = ""; - cout << fuc(fs_no_output(), fv<'n'>(stringify(Timestamp::now().seconds() - last_output.seconds()))); + if ((force) || (executor.active() != 1)) + { + cout << fuc(fs_output_heading(), fv<'h'>(heading)); + old_heading = ""; + cout << fuc(fs_no_output(), fv<'n'>(stringify(Timestamp::now().seconds() - last_output.seconds()))); + } } last_flushed = Timestamp::now(); @@ -1475,7 +1481,7 @@ namespace for (JobList::ConstIterator c(lists->execute_job_list()->begin()), c_end(lists->execute_job_list()->end()) ; c != c_end ; ++c) - executor.add(std::make_shared(env, cmdline, n_fetch_jobs, *c, lists, require_if, retcode_mutex, + executor.add(std::make_shared(env, cmdline, executor, n_fetch_jobs, *c, lists, require_if, retcode_mutex, retcode, counts, old_heading)); executor.execute(); -- cgit v1.2.3