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):
27
27
@property
28
28
@abstractmethod
29
29
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
+ """
30
35
pass
31
36
32
37
@abstractmethod
33
38
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
+ """
34
45
pass
35
46
36
47
def flush (
@@ -47,6 +58,11 @@ def flush(
47
58
48
59
@abstractmethod
49
60
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
+ """
50
66
pass
51
67
52
68
@abstractmethod
You can’t perform that action at this time.
0 commit comments