Skip to content

Исключения

Task exceptions.

TaskCancelError

Bases: RuntimeError

The exception thrown when a task is canceled.

Can be intercepted in Worker to handle task cancellations.
Source code in src/qtasks/exc/task.py
 4
 5
 6
 7
 8
 9
10
11
12
13
class TaskCancelError(RuntimeError):
    """
    The exception thrown when a task is canceled.

        Can be intercepted in Worker to handle task cancellations.
    """

    def __init__(self, *args):
        """Initializing an exception."""
        super().__init__(*args)

__init__(*args)

Initializing an exception.

Source code in src/qtasks/exc/task.py
11
12
13
def __init__(self, *args):
    """Initializing an exception."""
    super().__init__(*args)

Plugins exceptions.

TaskPluginTriggerError

Bases: Exception

The exception thrown when the plugin trigger fires.

Can be intercepted in Worker to process triggers.
Source code in src/qtasks/exc/plugins.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
class TaskPluginTriggerError(Exception):
    """
    The exception thrown when the plugin trigger fires.

        Can be intercepted in Worker to process triggers.
    """

    def __init__(self, *args, **kwargs):
        """Initializing an exception."""
        super().__init__(*args)
        self.kwargs = kwargs

__init__(*args, **kwargs)

Initializing an exception.

Source code in src/qtasks/exc/plugins.py
11
12
13
14
def __init__(self, *args, **kwargs):
    """Initializing an exception."""
    super().__init__(*args)
    self.kwargs = kwargs