mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
mononoke: use the background session mode from manual scrub
Summary: There are no users waiting on manual scrub, so set it to use the background session mode. Reviewed By: krallin Differential Revision: D23054581 fbshipit-source-id: 985bcadbaf17d2a8c92fdec811ecb239cbca7b37
This commit is contained in:
parent
d910adeb21
commit
e18cf0210f
@ -63,7 +63,7 @@ fn main(fb: fbinit::FacebookInit) -> Result<()> {
|
||||
|
||||
let mysql_options = args::parse_mysql_options(&matches);
|
||||
let blobstore_options = args::parse_blobstore_options(&matches);
|
||||
let ctx = CoreContext::new_with_logger(fb, logger.clone());
|
||||
let ctx = CoreContext::new_bulk_with_logger(fb, logger.clone());
|
||||
|
||||
let scrub = async move {
|
||||
let blobstore = open_blobstore(
|
||||
|
@ -32,6 +32,14 @@ impl CoreContext {
|
||||
session.new_context(logger, ScubaSampleBuilder::with_discard())
|
||||
}
|
||||
|
||||
// Context for bulk processing like scrubbing or bulk backfilling
|
||||
pub fn new_bulk_with_logger(fb: FacebookInit, logger: Logger) -> Self {
|
||||
let session = SessionContainer::builder(fb)
|
||||
.session_class(SessionClass::Background)
|
||||
.build();
|
||||
session.new_context(logger, ScubaSampleBuilder::with_discard())
|
||||
}
|
||||
|
||||
pub fn test_mock(fb: FacebookInit) -> Self {
|
||||
let session = SessionContainer::new_with_defaults(fb);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user