mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
context: add a PROGRESS: header in $BEESSTATUS
Make it clearer where the progress information goes. Also add placeholder text so the progress section isn't empty at startup, when the progress hasn't been calculated yet. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
69e9bdfb0f
commit
3a33a5386b
@ -98,6 +98,7 @@ BeesContext::dump_status()
|
|||||||
TaskMaster::print_queue(ofs);
|
TaskMaster::print_queue(ofs);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
ofs << "PROGRESS:\n";
|
||||||
ofs << get_progress();
|
ofs << get_progress();
|
||||||
|
|
||||||
ofs.close();
|
ofs.close();
|
||||||
@ -125,6 +126,9 @@ string
|
|||||||
BeesContext::get_progress()
|
BeesContext::get_progress()
|
||||||
{
|
{
|
||||||
unique_lock<mutex> lock(m_progress_mtx);
|
unique_lock<mutex> lock(m_progress_mtx);
|
||||||
|
if (m_progress_str.empty()) {
|
||||||
|
return "[No progess estimate available]\n";
|
||||||
|
}
|
||||||
return m_progress_str;
|
return m_progress_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user