ScrapingTaskQueue class

A task queue for web scraping with concurrency control

Constructors

ScrapingTaskQueue.new({int maxConcurrentTasks = 5, ScrapingLogger? logger})
Creates a new ScrapingTaskQueue with the given parameters

Properties

hashCode int
The hash code for this object.
no setterinherited
maxConcurrentTasks int
The maximum number of concurrent tasks
final
pendingTaskCount int
Gets the number of pending tasks
no setter
runningTaskCount int
Gets the number of running tasks
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
totalTaskCount int
Gets the total number of tasks (pending + running)
no setter

Methods

addTask<T>({required Future<T> task(), int priority = 0, String? taskName, void onStart()?, void onComplete(T result)?, void onError(dynamic error, StackTrace stackTrace)?}) Future<T>
Adds a task to the queue
clearPendingTasks() → void
Clears all pending tasks
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited