clearPendingTasks method

void clearPendingTasks()

Clears all pending tasks

Implementation

void clearPendingTasks() {
  final tasks = List<_ScrapingTask>.from(_pendingTasks);
  _pendingTasks.clear();

  for (final task in tasks) {
    task.completer.completeError(Exception('Task cancelled: queue cleared'));
  }

  _logger.info('Cleared ${tasks.length} pending tasks');
}