mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Inject JobQueue in NetworkOPs
This commit is contained in:
@@ -592,12 +592,12 @@ void NetworkOPsImp::onDeadlineTimer (beast::DeadlineTimer& timer)
|
||||
{
|
||||
if (timer == m_heartbeatTimer)
|
||||
{
|
||||
getApp().getJobQueue ().addJob (jtNETOP_TIMER, "NetOPs.heartbeat",
|
||||
m_job_queue.addJob (jtNETOP_TIMER, "NetOPs.heartbeat",
|
||||
std::bind (&NetworkOPsImp::processHeartbeatTimer, this));
|
||||
}
|
||||
else if (timer == m_clusterTimer)
|
||||
{
|
||||
getApp().getJobQueue ().addJob (jtNETOP_CLUSTER, "NetOPs.cluster",
|
||||
m_job_queue.addJob (jtNETOP_CLUSTER, "NetOPs.cluster",
|
||||
std::bind (&NetworkOPsImp::processClusterTimer, this));
|
||||
}
|
||||
}
|
||||
@@ -857,7 +857,7 @@ void NetworkOPsImp::submitTransaction (
|
||||
}
|
||||
}
|
||||
|
||||
getApp().getJobQueue().addJob (jtTRANSACTION, "submitTxn",
|
||||
m_job_queue.addJob (jtTRANSACTION, "submitTxn",
|
||||
std::bind (&NetworkOPsImp::processTransactionCbVoid, this,
|
||||
std::make_shared<Transaction> (trans, false),
|
||||
false, false, false, callback));
|
||||
@@ -912,7 +912,7 @@ void NetworkOPsImp::runTransactionQueue ()
|
||||
return;
|
||||
|
||||
{
|
||||
auto ev = getApp().getJobQueue ().getLoadEventAP (
|
||||
auto ev = m_job_queue.getLoadEventAP (
|
||||
jtTXN_PROC, "runTxnQ");
|
||||
|
||||
{
|
||||
@@ -1001,7 +1001,7 @@ Transaction::pointer NetworkOPsImp::processTransactionCb (
|
||||
Transaction::pointer trans,
|
||||
bool bAdmin, bool bLocal, bool bFailHard, stCallback callback)
|
||||
{
|
||||
auto ev = getApp().getJobQueue ().getLoadEventAP (jtTXN_PROC, "ProcessTXN");
|
||||
auto ev = m_job_queue.getLoadEventAP (jtTXN_PROC, "ProcessTXN");
|
||||
int newFlags = getApp().getHashRouter ().getFlags (trans->getID ());
|
||||
|
||||
if ((newFlags & SF_BAD) != 0)
|
||||
@@ -2412,7 +2412,7 @@ Json::Value NetworkOPsImp::getServerInfo (bool human, bool admin)
|
||||
// info[jss::consensus] = mConsensus->getJson();
|
||||
|
||||
if (admin)
|
||||
info[jss::load] = getApp().getJobQueue ().getJson ();
|
||||
info[jss::load] = m_job_queue.getJson ();
|
||||
|
||||
if (!human)
|
||||
{
|
||||
@@ -2630,7 +2630,7 @@ void NetworkOPsImp::reportFeeChange ()
|
||||
(getApp().getFeeTrack ().getLoadFactor () == mLastLoadFactor))
|
||||
return;
|
||||
|
||||
getApp().getJobQueue ().addJob (
|
||||
m_job_queue.addJob (
|
||||
jtCLIENT, "reportFeeChange->pubServer",
|
||||
std::bind (&NetworkOPsImp::pubServer, this));
|
||||
}
|
||||
@@ -3625,7 +3625,7 @@ void NetworkOPsImp::gotFetchPack (bool progress, std::uint32_t seq)
|
||||
// InboundLedgers::gotFetchPack being called more than once
|
||||
// which is expensive. A flag should track whether we've already dispatched
|
||||
|
||||
getApp().getJobQueue ().addJob (
|
||||
m_job_queue.addJob (
|
||||
jtLEDGER_DATA, "gotFetchPack",
|
||||
std::bind (&InboundLedgers::gotFetchPack,
|
||||
&getApp().getInboundLedgers (), std::placeholders::_1));
|
||||
|
||||
Reference in New Issue
Block a user