fn scheduler_create(
  py: Python,
  executor_ptr: PyExecutor,
  tasks_ptr: PyTasks,
  types_ptr: PyTypes,
  build_root_buf: String,
  local_store_dir_buf: String,
  local_execution_root_dir_buf: String,
  named_caches_dir_buf: String,
  ignore_patterns: Vec<String>,
  use_gitignore: bool,
  root_type_ids: Vec<PyType>,
  remoting_options: PyRemotingOptions,
  exec_strategy_opts: PyExecutionStrategyOptions,
) -> CPyResult<PyScheduler> {
  match fs::increase_limits() {
    Ok(msg) => debug!("{}", msg),
    Err(e) => warn!("{}", e),
  }
  let core: Result<Core, String> = with_executor(py, executor_ptr, |executor| {
    let types = types_ptr
      .types(py)
      .borrow_mut()
      .take()
      .ok_or_else(|| "An instance of PyTypes may only be used once.".to_owned())?;
    let intrinsics = Intrinsics::new(&types);
    let mut tasks = tasks_ptr.tasks(py).replace(Tasks::new());
    tasks.intrinsics_set(&intrinsics);

    Core::new(
      executor.clone(),
      root_type_ids.into_iter().map(externs::type_for).collect(),
      tasks,
      types,
      intrinsics,
      PathBuf::from(build_root_buf),
      ignore_patterns,
      use_gitignore,
      PathBuf::from(local_store_dir_buf),
      PathBuf::from(local_execution_root_dir_buf),
      PathBuf::from(named_caches_dir_buf),
      remoting_options.options(py).clone(),
      exec_strategy_opts.options(py).clone(),
    )
  });
  PyScheduler::create_instance(
    py,
    Scheduler::new(core.map_err(|e| PyErr::new::<exc::ValueError, _>(py, (e,)))?),
  )
}
///
/// Given a set of Tasks and type information, creates a Scheduler.
///
/// The given Tasks struct will be cloned, so no additional mutation of the reference will
/// affect the created Scheduler.
///
Given a set of Tasks and type information, creates a Scheduler.
The given Tasks struct will be cloned, so no additional mutation of the reference will
affect the created Scheduler.
Given a set of Tasks and type information creates a Scheduler . The given Tasks struct will be cloned so no additional mutation of the reference will affect the created Scheduler .
fn scheduler_create(
  py: Python,
  executor_ptr: PyExecutor,
  tasks_ptr: PyTasks,
  types_ptr: PyTypes,
  build_root_buf: String,
  local_store_dir_buf: String,
  local_execution_root_dir_buf: String,
  named_caches_dir_buf: String,
  ignore_patterns: Vec<String>,
  use_gitignore: bool,
  root_type_ids: Vec<PyType>,
  remoting_options: PyRemotingOptions,
  exec_strategy_opts: PyExecutionStrategyOptions,
) -> CPyResult<PyScheduler> {
  match fs::increase_limits() {
    Ok(msg) => debug!("{}", msg),
    Err(e) => warn!("{}", e),
  }
  let core: Result<Core, String> = with_executor(py, executor_ptr, |executor| {
    let types = types_ptr
      .types(py)
      .borrow_mut()
      .take()
      .ok_or_else(|| "An instance of PyTypes may only be used once.".to_owned())?;
    let intrinsics = Intrinsics::new(&types);
    let mut tasks = tasks_ptr.tasks(py).replace(Tasks::new());
    tasks.intrinsics_set(&intrinsics);
    Core::new(
      executor.clone(),
      root_type_ids.into_iter().map(externs::type_for).collect(),
      tasks,
      types,
      intrinsics,
      PathBuf::from(build_root_buf),
      ignore_patterns,
      use_gitignore,
      PathBuf::from(local_store_dir_buf),
      PathBuf::from(local_execution_root_dir_buf),
      PathBuf::from(named_caches_dir_buf),
      remoting_options.options(py).clone(),
      exec_strategy_opts.options(py).clone(),
    )
  });
  PyScheduler::create_instance(
    py,
    Scheduler::new(core.map_err(|e| PyErr::new::<exc::ValueError, _>(py, (e,)))?),
  )
}
fn scheduler_create ( py : Python , executor_ptr : PyExecutor , tasks_ptr : PyTasks , types_ptr : PyTypes , build_root_buf : String , local_store_dir_buf : String , local_execution_root_dir_buf : String , named_caches_dir_buf : String , ignore_patterns : Vec < String > , use_gitignore : bool , root_type_ids : Vec < PyType > , remoting_options : PyRemotingOptions , exec_strategy_opts : PyExecutionStrategyOptions , ) -> CPyResult < PyScheduler > { match fs :: increase_limits ( ) { Ok ( msg ) => debug ! ( " " msg ) , Err ( e ) => warn ! ( " " e ) , } let core : Result < Core , String > = with_executor ( py , executor_ptr , | executor | { let types = types_ptr . types ( py ) . borrow_mut ( ) . take ( ) . ok_or_else ( | | " " . to_owned ( ) ) ? ; let intrinsics = Intrinsics :: new ( & types ) ; let mut tasks = tasks_ptr . tasks ( py ) . replace ( Tasks :: new ( ) ) ; tasks . intrinsics_set ( & intrinsics ) ; Core :: new ( executor . clone ( ) , root_type_ids . into_iter ( ) . map ( externs :: type_for ) . collect ( ) , tasks , types , intrinsics , PathBuf :: from ( build_root_buf ) , ignore_patterns , use_gitignore , PathBuf :: from ( local_store_dir_buf ) , PathBuf :: from ( local_execution_root_dir_buf ) , PathBuf :: from ( named_caches_dir_buf ) , remoting_options . options ( py ) . clone ( ) , exec_strategy_opts . options ( py ) . clone ( ) , ) } ) ; PyScheduler :: create_instance ( py , Scheduler :: new ( core . map_err ( | e | PyErr :: new :: < exc :: ValueError , _ > ( py , ( e , ) ) ) ? ) , ) }
Given a set of Tasks and type information, creates a Scheduler.
Given a set of Tasks and type information creates a Scheduler .
py
Python
executor_ptr
PyExecutor
tasks_ptr
PyTasks
types_ptr
PyTypes
build_root_buf
String
local_store_dir_buf
String
local_execution_root_dir_buf
String
named_caches_dir_buf
String
ignore_patterns
Vec<String>
use_gitignore
bool
root_type_ids
Vec<PyType>
remoting_options
PyRemotingOptions
exec_strategy_opts
PyExecutionStrategyOptions
py
Python
executor_ptr
PyExecutor
tasks_ptr
PyTasks
types_ptr
PyTypes
build_root_buf
String
local_store_dir_buf
String
local_execution_root_dir_buf
String
named_caches_dir_buf
String
ignore_patterns
Vec<String>
use_gitignore
bool
root_type_ids
Vec<PyType>
remoting_options
PyRemotingOptions
exec_strategy_opts
PyExecutionStrategyOptions