Skip to content

Conversation

@AdwitaSingh1711
Copy link

Summary:
Implements a 30-second warning and 300-second abort function mechanism as default for functions in src/execution/evaluator.rs. It also allows per-function overriding by specifying a timeout in decorator arguments, similar to the caching method.

Fixes #658

Examples:

  1. In examples/manuals_llm_extraction/main.py we can add @cocoindex.op.executor_class(timeout=15) to override current 300second timeout as shown
Screenshot 2025-11-02 at 8 09 34 AM
  1. Additionally, if any other function takes longer than 30 seconds to execute, a warning message is displayed. If the execution time exceeds 300 seconds, the function times out.

Checklist:

  • I have run all tests and pre-commit checks, which have passed.
  • Cache, logs and others are not accidentally added to git's tracking history.
  • My commits follow the conventional commits format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Avoid a single function stuck forever

1 participant