fix after merge

federation-send-parallel
phiresky 2024-05-30 12:23:37 +02:00
parent 7cb4e8222c
commit 10d3b7d698
1 changed files with 3 additions and 3 deletions

View File

@ -77,6 +77,7 @@ impl SendManager {
pub fn run(opts: Opts, context: FederationConfig<LemmyContext>, config: FederationWorkerConfig) -> CancellableTask { pub fn run(opts: Opts, context: FederationConfig<LemmyContext>, config: FederationWorkerConfig) -> CancellableTask {
CancellableTask::spawn(WORKER_EXIT_TIMEOUT, move |cancel| { CancellableTask::spawn(WORKER_EXIT_TIMEOUT, move |cancel| {
let opts = opts.clone(); let opts = opts.clone();
let config = config.clone();
let context = context.clone(); let context = context.clone();
let mut manager = Self::new(opts, context, config); let mut manager = Self::new(opts, context, config);
async move { async move {
@ -135,7 +136,7 @@ impl SendManager {
// create new worker // create new worker
let context = self.context.clone(); let context = self.context.clone();
let stats_sender = self.stats_sender.clone(); let stats_sender = self.stats_sender.clone();
let federation_worker_config = federation_worker_config.clone(); let federation_worker_config = self.federation_worker_config.clone();
self.workers.insert( self.workers.insert(
instance.id, instance.id,
@ -143,10 +144,9 @@ impl SendManager {
// if the instance worker ends unexpectedly due to internal/db errors, this lambda is // if the instance worker ends unexpectedly due to internal/db errors, this lambda is
// rerun by cancellabletask. // rerun by cancellabletask.
let instance = instance.clone(); let instance = instance.clone();
let req_data = context.to_request_data();
InstanceWorker::init_and_loop( InstanceWorker::init_and_loop(
instance, instance,
req_data, context.clone(),
federation_worker_config.clone(), federation_worker_config.clone(),
stop, stop,
stats_sender.clone(), stats_sender.clone(),