Class: QgsProcessingAlgRunnerTask

QgsTask task which runs a QgsProcessingAlgorithm in a background task.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProcessingAlgRunnerTask

Base classes

QgsTask

Abstract base class for long running background tasks.

QObject

Methods

algorithmCanceled

Returns True if the algorithm was canceled.

Signals

executed

Emitted when the algorithm has finished execution.

class qgis.core.QgsProcessingAlgRunnerTask[source]

Bases: QgsTask

__init__(algorithm: QgsProcessingAlgorithm | None, parameters: Dict[str, Any], context: QgsProcessingContext, feedback: QgsProcessingFeedback | None = None, flags: QgsTask.Flags | QgsTask.Flag = QgsTask.CanCancel)

Constructor for QgsProcessingAlgRunnerTask. Takes an algorithm, algorithm parameters and processing context.

Since QGIS 3.26, the flags argument allows control over task flags.

Parameters:
algorithmCanceled(self) bool[source]

Returns True if the algorithm was canceled.

Added in version 3.26.

Return type:

bool

signal executed(successful: bool, results: Dict[str, object])[source]

Emitted when the algorithm has finished execution. If the algorithm completed execution without errors then successful will be True. The results argument contains the results reported by the algorithm.

Parameters:
  • successful (bool)

  • results (Dict[str, object])