Skip to content

Commit

Permalink
Optionally log in yield_periodically
Browse files Browse the repository at this point in the history
Summary:
## This stack

I am trying to debug a case of some methods stalling the entire reactor. See https://fb.workplace.com/groups/1708850869939124/permalink/1836334797190730/ for context.

## This diff

SSIA

Reviewed By: mitrandir77

Differential Revision: D66171895

fbshipit-source-id: 4d5d37c057996c4c7798f198046c5a7550f351f0
  • Loading branch information
andreacampi authored and facebook-github-bot committed Nov 22, 2024
1 parent 03e5721 commit 2ceb180
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion eden/mononoke/scs/scs_methods/src/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use futures::stream;
use futures::stream::Stream;
use futures::stream::StreamExt;
use futures::stream::TryStreamExt;
use futures_ext::FbStreamExt;
use futures_watchdog::WatchdogExt;
use mononoke_api::ChangesetContext;
use mononoke_api::CoreContext;
Expand Down Expand Up @@ -82,7 +83,9 @@ pub(crate) async fn collect_history(
Err(err) => Err(err),
}
})
.buffered(100)
.buffered(10)
.yield_periodically()
.with_logger(ctx.logger())
.try_collect()
.watched(ctx.logger())
.await?;
Expand Down

0 comments on commit 2ceb180

Please sign in to comment.