mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Add more Validators journal reports
This commit is contained in:
@@ -37,7 +37,7 @@ enum
|
|||||||
,checkEverySeconds = 60 * 60
|
,checkEverySeconds = 60 * 60
|
||||||
#else
|
#else
|
||||||
secondsBetweenFetches = 5 * 60
|
secondsBetweenFetches = 5 * 60
|
||||||
,checkEverySeconds = 60 * 60
|
,checkEverySeconds = 60
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// This tunes the preallocated arrays
|
// This tunes the preallocated arrays
|
||||||
|
|||||||
@@ -129,10 +129,6 @@ public:
|
|||||||
, m_checkSources (true)
|
, m_checkSources (true)
|
||||||
{
|
{
|
||||||
m_journal.sink().set_console (true);
|
m_journal.sink().set_console (true);
|
||||||
|
|
||||||
addRPCHandlers();
|
|
||||||
|
|
||||||
startThread();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
~ManagerImp ()
|
~ManagerImp ()
|
||||||
@@ -145,9 +141,28 @@ public:
|
|||||||
// Stoppable
|
// Stoppable
|
||||||
//
|
//
|
||||||
|
|
||||||
void onStop (Journal)
|
void onPrepare (Journal journal)
|
||||||
{
|
{
|
||||||
|
journal.info << "Preparing Validators";
|
||||||
|
|
||||||
|
addRPCHandlers();
|
||||||
|
}
|
||||||
|
|
||||||
|
void onStart (Journal journal)
|
||||||
|
{
|
||||||
|
journal.info << "Starting Validators";
|
||||||
|
|
||||||
|
startThread();
|
||||||
|
}
|
||||||
|
|
||||||
|
void onStop (Journal journal)
|
||||||
|
{
|
||||||
|
journal.info << "Stopping Validators";
|
||||||
|
|
||||||
|
if (this->Thread::isThreadRunning())
|
||||||
m_queue.dispatch (bind (&Thread::signalThreadShouldExit, this));
|
m_queue.dispatch (bind (&Thread::signalThreadShouldExit, this));
|
||||||
|
else
|
||||||
|
stopped();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
@@ -301,7 +316,7 @@ public:
|
|||||||
m_checkSources = false;
|
m_checkSources = false;
|
||||||
|
|
||||||
m_journal.trace << "Next check timer expires in " <<
|
m_journal.trace << "Next check timer expires in " <<
|
||||||
RelativeTime::seconds (checkEverySeconds) << " seconds";
|
RelativeTime::seconds (checkEverySeconds);
|
||||||
|
|
||||||
m_checkTimer.setExpiration (checkEverySeconds);
|
m_checkTimer.setExpiration (checkEverySeconds);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user