Track uptime. Update local fee schedule based on load manager.

This commit is contained in:
JoelKatz
2013-02-05 21:33:42 -08:00
parent 1b2c0b9242
commit 5aa810404b
8 changed files with 128 additions and 3 deletions

View File

@@ -181,6 +181,16 @@ Json::Value JobQueue::getJson(int)
return ret;
}
int JobQueue::isOverloaded()
{
int count = 0;
boost::mutex::scoped_lock sl(mJobLock);
for (int i = 0; i < NUM_JOB_TYPES; ++i)
if (mJobLoads[i].isOver())
++count;
return count;
}
void JobQueue::shutdown()
{ // shut down the job queue without completing pending jobs
cLog(lsINFO) << "Job queue shutting down";