@@ -381,12 +381,6 @@ async fn evaluate_op_scope(
381381 for value in assemble_input_values ( & op. inputs , scoped_entries) {
382382 input_values. push ( value?) ;
383383 }
384-
385- // let timeout_duration = op
386- // .function_exec_info
387- // .timeout
388- // .unwrap_or(Duration::from_secs(300));
389- // let warn_duration = Duration::from_secs(30);
390384 let timeout_duration = op
391385 . function_exec_info
392386 . timeout
@@ -413,8 +407,6 @@ async fn evaluate_op_scope(
413407 let eval_future = evaluate_with_cell ( output_value_cell. as_ref ( ) , move || {
414408 op. executor . evaluate ( input_values)
415409 } ) ;
416-
417- // Warning + timeout logic
418410 let mut eval_future = Box :: pin ( eval_future) ;
419411 let mut warned = false ;
420412 let timeout_future = tokio:: time:: sleep ( timeout_duration) ;
@@ -448,8 +440,6 @@ async fn evaluate_op_scope(
448440 res. and_then ( |v| head_scope. define_field ( & op. output , & v) )
449441 } else {
450442 let eval_future = op. executor . evaluate ( input_values) ;
451-
452- // Warning + timeout logic
453443 let mut eval_future = Box :: pin ( eval_future) ;
454444 let mut warned = false ;
455445 let timeout_future = tokio:: time:: sleep ( timeout_duration) ;
@@ -482,84 +472,6 @@ async fn evaluate_op_scope(
482472
483473 res. and_then ( |v| head_scope. define_field ( & op. output , & v) )
484474 } ;
485- // let warn_handle = tokio::spawn(async move {
486- // tokio::time::sleep(warn_duration).await;
487- // eprintln!(
488- // "WARNING: Function '{}' ({}) is taking longer than 30s",
489- // op_kind_for_warning, op_name_for_warning
490- // );
491- // warn!(
492- // "Function '{}' ({}) is taking longer than 30s",
493- // op_kind_for_warning, op_name_for_warning
494- // );
495- // });
496-
497- // let mut op_future = Box::pin(op.executor.evaluate(input_values));
498- // let mut warned = false;
499- // let warn_handle = loop{
500- // tokio::select!{
501- // res = &mut op_future => {
502- // break res;
503- // }
504- // _ = tokio::time::sleep(warn_duration), if !warned => {
505- // warn!(
506- // "Function '{}' ({}) is taking longer than {}s",
507- // op_kind_for_warning, op_name_for_warning, WARNING_THRESHOLD
508- // );
509- // warned = true;
510- // }
511- // }
512- // };
513- // let result = if op.function_exec_info.enable_cache {
514- // let output_value_cell = memory.get_cache_entry(
515- // || {
516- // Ok(op
517- // .function_exec_info
518- // .fingerprinter
519- // .clone()
520- // .with(&input_values)?
521- // .into_fingerprint())
522- // },
523- // &op.function_exec_info.output_type,
524- // /*ttl=*/ None,
525- // )?;
526-
527- // let eval_future = evaluate_with_cell(output_value_cell.as_ref(), move || {
528- // op.executor.evaluate(input_values)
529- // });
530-
531- // let timeout_result = tokio::time::timeout(timeout_duration, eval_future).await;
532- // if timeout_result.is_err() {
533- // Err(anyhow!(
534- // "Function '{}' ({}) timed out after {} seconds",
535- // op.op_kind,
536- // op.name,
537- // timeout_duration.as_secs()
538- // ))
539- // } else {
540- // timeout_result
541- // .unwrap()
542- // .and_then(|v| head_scope.define_field(&op.output, &v))
543- // }
544- // } else {
545- // let eval_future = op.executor.evaluate(input_values);
546-
547- // let timeout_result = tokio::time::timeout(timeout_duration, eval_future).await;
548- // if timeout_result.is_err() {
549- // Err(anyhow!(
550- // "Function '{}' ({}) timed out after {} seconds",
551- // op.op_kind,
552- // op.name,
553- // timeout_duration.as_secs()
554- // ))
555- // } else {
556- // timeout_result
557- // .unwrap()
558- // .and_then(|v| head_scope.define_field(&op.output, &v))
559- // }
560- // };
561-
562- // warn_handle.abort();
563475
564476 if let Some ( ref op_stats) = operation_in_process_stats {
565477 op_stats. finish_processing ( & transform_key, 1 ) ;
0 commit comments