Documentation Index
Fetch the complete documentation index at: https://splinter.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Stop workflows after N seconds.
Usage
from splinter import Gateway, ExecutionLimits
gateway = Gateway(limits=ExecutionLimits(
max_time_seconds=300, # 5 minutes max
))
Error Handling
from splinter.exceptions import TimeLimitExceededError
try:
result = await workflow.run()
except TimeLimitExceededError as e:
print(f"Time limit exceeded: {e.elapsed:.2f}s >= {e.limit:.2f}s")
Metrics
metrics = gateway.get_metrics()
print(f"Elapsed: {metrics['elapsed_seconds']:.2f}s")
Use Cases
- SLA compliance: Ensure workflows complete in time
- Resource management: Free up resources after timeout
- User experience: Don’t leave users waiting forever