Reduce worker count to reduce postgres connections
This commit is contained in:
@@ -22,7 +22,7 @@ use std::time::Instant;
|
||||
use taskrun::tokio;
|
||||
use tokio::task::JoinHandle;
|
||||
|
||||
const SEARCH_DB_PIPELINE_LEN: usize = 4;
|
||||
const SEARCH_DB_PIPELINE_LEN: usize = 2;
|
||||
|
||||
#[allow(unused)]
|
||||
macro_rules! debug_batch {
|
||||
@@ -144,6 +144,7 @@ async fn finder_worker_single(
|
||||
db: Database,
|
||||
stats: Arc<IocFinderStats>,
|
||||
) -> Result<(), Error> {
|
||||
debug!("finder_worker_single make_pg_client");
|
||||
let (pg, jh) = make_pg_client(&db)
|
||||
.await
|
||||
.map_err(|e| Error::with_msg_no_trace(e.to_string()))?;
|
||||
|
||||
@@ -11,8 +11,8 @@ use err::ThisError;
|
||||
use futures_util::StreamExt;
|
||||
use futures_util::TryStreamExt;
|
||||
use items_2::eventsdim0::EventsDim0;
|
||||
use items_2::eventsdim0::EventsDim0Enum;
|
||||
use items_2::eventsdim0::EventsDim0NoPulse;
|
||||
use items_2::eventsdim0enum::EventsDim0Enum;
|
||||
use items_2::eventsdim1::EventsDim1;
|
||||
use items_2::eventsdim1::EventsDim1NoPulse;
|
||||
use netpod::log::*;
|
||||
|
||||
Reference in New Issue
Block a user