|
24 | 24 | from ..actor import Actor |
25 | 25 | from ..broker import Broker, MessageProxy |
26 | 26 | from ..message import Message |
27 | | - from ..worker import Worker, _ConsumerThread, _WorkerThread |
| 27 | + from ..worker import ConsumerThread, Worker, WorkerThread |
28 | 28 |
|
29 | 29 |
|
30 | 30 | class MiddlewareError(Exception): |
@@ -137,19 +137,19 @@ def before_worker_shutdown(self, broker: Broker, worker: Worker) -> None: |
137 | 137 | def after_worker_shutdown(self, broker: Broker, worker: Worker) -> None: |
138 | 138 | """Called after the worker process shuts down.""" |
139 | 139 |
|
140 | | - def after_consumer_thread_boot(self, broker: Broker, thread: _ConsumerThread) -> None: |
| 140 | + def after_consumer_thread_boot(self, broker: Broker, thread: ConsumerThread) -> None: |
141 | 141 | """Called from a consumer thread after it starts but before it starts its run loop.""" |
142 | 142 |
|
143 | | - def before_consumer_thread_shutdown(self, broker: Broker, thread: _ConsumerThread) -> None: |
| 143 | + def before_consumer_thread_shutdown(self, broker: Broker, thread: ConsumerThread) -> None: |
144 | 144 | """Called before a consumer thread shuts down. This may be |
145 | 145 | used to clean up thread-local resources (such as Django |
146 | 146 | database connections). |
147 | 147 | """ |
148 | 148 |
|
149 | | - def after_worker_thread_boot(self, broker: Broker, thread: _WorkerThread) -> None: |
| 149 | + def after_worker_thread_boot(self, broker: Broker, thread: WorkerThread) -> None: |
150 | 150 | """Called from a worker thread after it starts but before it starts its run loop.""" |
151 | 151 |
|
152 | | - def before_worker_thread_shutdown(self, broker: Broker, thread: _WorkerThread) -> None: |
| 152 | + def before_worker_thread_shutdown(self, broker: Broker, thread: WorkerThread) -> None: |
153 | 153 | """Called before a worker thread shuts down. This may be used |
154 | 154 | to clean up thread-local resources (such as Django database |
155 | 155 | connections). |
|
0 commit comments