diff --git a/lightbulb/client.py b/lightbulb/client.py index bf3bf627..8dc35831 100644 --- a/lightbulb/client.py +++ b/lightbulb/client.py @@ -332,10 +332,10 @@ def task( # noqa: D417 the client upon the client being started, the task will also be started; it will also be started if being added to an already-started client. max_failures: The maximum number of failed attempts to execute the task before it is cancelled. - Setting this to a negative number will disable this behavior, and the task won't be canceled, + Setting this to a negative number will disable this behaviour, and the task won't be cancelled, no matter how often the task fails. max_invocations: The maximum number of times the task can be invoked before being stopped. - Setting this to a negative number will disable this behavior, allowing unlimited invocations. + Setting this to a negative number will disable this behaviour, allowing unlimited invocations. Note: This method can also be called with an existing task object to register it directly. diff --git a/lightbulb/loaders.py b/lightbulb/loaders.py index b25e5660..10d90c1f 100644 --- a/lightbulb/loaders.py +++ b/lightbulb/loaders.py @@ -400,10 +400,10 @@ def task( the client upon the client being started, the task will also be started; it will also be started if being added to an already-started client. max_failures: The maximum number of failed attempts to execute the task before it is cancelled. - Setting this to a negative number will disable this behavior, and the task won't be canceled, + Setting this to a negative number will disable this behaviour, and the task won't be cancelled, no matter how often the task fails. max_invocations: The maximum number of times the task can be invoked before being stopped. - Setting this to a negative number will disable this behavior, allowing unlimited invocations. + Setting this to a negative number will disable this behaviour, allowing unlimited invocations. Example: diff --git a/lightbulb/tasks.py b/lightbulb/tasks.py index 1dbfcb43..4eee4582 100644 --- a/lightbulb/tasks.py +++ b/lightbulb/tasks.py @@ -223,10 +223,10 @@ class Task: the client upon the client being started, the task will also be started; it will also be started if being added to an already-started client. max_failures: The maximum number of failed attempts to execute the task before it is cancelled. - Setting this to a negative number will disable this behavior, and the task won't be canceled, + Setting this to a negative number will disable this behaviour, and the task won't be cancelled, no matter how often the task fails. max_invocations: The maximum number of times the task can be invoked before being stopped. - Setting this to a negative number will disable this behavior, allowing unlimited invocations. + Setting this to a negative number will disable this behaviour, allowing unlimited invocations. """ __slots__ = [