File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments