Skip to content

Commit 1fbf85f

Browse files
committed
ref(worker): Add missing docstrings to worker ABC
GH-4578
1 parent 268ea1a commit 1fbf85f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

sentry_sdk/worker.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,21 @@ class Worker(ABC):
2727
@property
2828
@abstractmethod
2929
def is_alive(self) -> bool:
30+
"""
31+
Checks whether the worker is alive and running.
32+
33+
Returns True if the worker is alive, False otherwise.
34+
"""
3035
pass
3136

3237
@abstractmethod
3338
def kill(self) -> None:
39+
"""
40+
Kills the worker.
41+
42+
This method is used to kill the worker. The queue will be drained up to the point where the worker is killed.
43+
The worker will not be able to process any more events.
44+
"""
3445
pass
3546

3647
def flush(
@@ -47,6 +58,11 @@ def flush(
4758

4859
@abstractmethod
4960
def full(self) -> bool:
61+
"""
62+
Checks whether the worker's queue is full.
63+
64+
Returns True if the queue is full, False otherwise.
65+
"""
5066
pass
5167

5268
@abstractmethod

0 commit comments

Comments
 (0)