sec_interp.gui.tasks.drillhole_task module

class sec_interp.gui.tasks.drillhole_task.DrillholeGenerationTask(*args: Any, **kwargs: Any)[source]

Bases: QgsTask

Background task for generating drillhole traces/intervals.

This task executes the projection and intersection logic in a separate thread, using only detached data (DTOs) ensuring thread safety.

__init__(service: DrillholeService, task_input: DrillholeTaskInput, on_finished: Callable[[Any], None], on_error: Callable[[str], None] | None = None)[source]

Initialize the task.

Parameters:
  • service – The DrillholeService instance (stateless logic).

  • task_input – The detached data input DTO.

  • on_finished – Callback function to receive results (drillhole tuple).

  • on_error – Optional callback for error handling.

finished(result: bool)[source]

Handle task completion on Main Thread.

run() bool[source]

Execute the task in background thread.