Skip to content

Commit 0620d5c

Browse files
cleaned commented code
1 parent bd45876 commit 0620d5c

File tree

2 files changed

+0
-91
lines changed

2 files changed

+0
-91
lines changed

src/builder/analyzer.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -817,9 +817,6 @@ impl AnalyzerContext {
817817
})?;
818818
let enable_cache = executor.enable_cache();
819819
let behavior_version = executor.behavior_version();
820-
// let timeout = executor.timeout()
821-
// .or(execution_options_timeout)
822-
// .or(Some(Duration::from_secs(300)));
823820
let timeout = executor.timeout()
824821
.or(execution_options_timeout)
825822
.or(Some(Duration::from_secs(TIMEOUT_THRESHOLD)));

src/execution/evaluator.rs

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -383,12 +383,6 @@ async fn evaluate_op_scope(
383383
for value in assemble_input_values(&op.inputs, scoped_entries) {
384384
input_values.push(value?);
385385
}
386-
387-
// let timeout_duration = op
388-
// .function_exec_info
389-
// .timeout
390-
// .unwrap_or(Duration::from_secs(300));
391-
// let warn_duration = Duration::from_secs(30);
392386
let timeout_duration = op
393387
.function_exec_info
394388
.timeout
@@ -415,8 +409,6 @@ async fn evaluate_op_scope(
415409
let eval_future = evaluate_with_cell(output_value_cell.as_ref(), move || {
416410
op.executor.evaluate(input_values)
417411
});
418-
419-
// Warning + timeout logic
420412
let mut eval_future = Box::pin(eval_future);
421413
let mut warned = false;
422414
let timeout_future = tokio::time::sleep(timeout_duration);
@@ -450,8 +442,6 @@ async fn evaluate_op_scope(
450442
res.and_then(|v| head_scope.define_field(&op.output, &v))
451443
} else {
452444
let eval_future = op.executor.evaluate(input_values);
453-
454-
// Warning + timeout logic
455445
let mut eval_future = Box::pin(eval_future);
456446
let mut warned = false;
457447
let timeout_future = tokio::time::sleep(timeout_duration);
@@ -484,84 +474,6 @@ async fn evaluate_op_scope(
484474

485475
res.and_then(|v| head_scope.define_field(&op.output, &v))
486476
};
487-
// let warn_handle = tokio::spawn(async move {
488-
// tokio::time::sleep(warn_duration).await;
489-
// eprintln!(
490-
// "WARNING: Function '{}' ({}) is taking longer than 30s",
491-
// op_kind_for_warning, op_name_for_warning
492-
// );
493-
// warn!(
494-
// "Function '{}' ({}) is taking longer than 30s",
495-
// op_kind_for_warning, op_name_for_warning
496-
// );
497-
// });
498-
499-
// let mut op_future = Box::pin(op.executor.evaluate(input_values));
500-
// let mut warned = false;
501-
// let warn_handle = loop{
502-
// tokio::select!{
503-
// res = &mut op_future => {
504-
// break res;
505-
// }
506-
// _ = tokio::time::sleep(warn_duration), if !warned => {
507-
// warn!(
508-
// "Function '{}' ({}) is taking longer than {}s",
509-
// op_kind_for_warning, op_name_for_warning, WARNING_THRESHOLD
510-
// );
511-
// warned = true;
512-
// }
513-
// }
514-
// };
515-
// let result = if op.function_exec_info.enable_cache {
516-
// let output_value_cell = memory.get_cache_entry(
517-
// || {
518-
// Ok(op
519-
// .function_exec_info
520-
// .fingerprinter
521-
// .clone()
522-
// .with(&input_values)?
523-
// .into_fingerprint())
524-
// },
525-
// &op.function_exec_info.output_type,
526-
// /*ttl=*/ None,
527-
// )?;
528-
529-
// let eval_future = evaluate_with_cell(output_value_cell.as_ref(), move || {
530-
// op.executor.evaluate(input_values)
531-
// });
532-
533-
// let timeout_result = tokio::time::timeout(timeout_duration, eval_future).await;
534-
// if timeout_result.is_err() {
535-
// Err(anyhow!(
536-
// "Function '{}' ({}) timed out after {} seconds",
537-
// op.op_kind,
538-
// op.name,
539-
// timeout_duration.as_secs()
540-
// ))
541-
// } else {
542-
// timeout_result
543-
// .unwrap()
544-
// .and_then(|v| head_scope.define_field(&op.output, &v))
545-
// }
546-
// } else {
547-
// let eval_future = op.executor.evaluate(input_values);
548-
549-
// let timeout_result = tokio::time::timeout(timeout_duration, eval_future).await;
550-
// if timeout_result.is_err() {
551-
// Err(anyhow!(
552-
// "Function '{}' ({}) timed out after {} seconds",
553-
// op.op_kind,
554-
// op.name,
555-
// timeout_duration.as_secs()
556-
// ))
557-
// } else {
558-
// timeout_result
559-
// .unwrap()
560-
// .and_then(|v| head_scope.define_field(&op.output, &v))
561-
// }
562-
// };
563-
564-
// warn_handle.abort();
565477

566478
if let Some(ref op_stats) = operation_in_process_stats {
567479
op_stats.finish_processing(&transform_key, 1);

0 commit comments

Comments
 (0)