Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions ballista/executor/src/executor_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,16 @@ pub async fn start_executor_process(
let scheduler_port = opt.scheduler_port;
let scheduler_url = format!("http://{scheduler_host}:{scheduler_port}");

let work_dir = opt
.work_dir
.clone()
.unwrap_or(TempDir::new()?.path().to_str().unwrap().to_string());
let work_dir = if let Some(work_dir) = opt.work_dir.clone() {
work_dir
} else if let Some(temp_dir) = TempDir::new()?.path().to_str().map(ToOwned::to_owned)
{
temp_dir
} else {
return Err(BallistaError::Configuration(
"Unable to bind work dir".to_string(),
));
};

let concurrent_tasks = if opt.concurrent_tasks == 0 {
// use all available cores if no concurrency level is specified
Expand Down