No need to explicitly specify request_queue and response_queue on Worker derived classes
This commit is contained in:
parent
d1ea69262a
commit
0cef9c6070
1 changed files with 2 additions and 4 deletions
|
@ -1,4 +1,3 @@
|
||||||
import multiprocessing
|
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
@ -17,9 +16,8 @@ class ScanResult:
|
||||||
class Scanner(Worker):
|
class Scanner(Worker):
|
||||||
timeout = 1.5
|
timeout = 1.5
|
||||||
|
|
||||||
def __init__(self, request_queue: multiprocessing.Queue, response_queue: multiprocessing.Queue,
|
def __init__(self, port: int = WemoRunner.default_port, *args, **kwargs):
|
||||||
port: int = WemoRunner.default_port):
|
super().__init__(*args, **kwargs)
|
||||||
super().__init__(request_queue, response_queue)
|
|
||||||
self.port = port
|
self.port = port
|
||||||
|
|
||||||
def process(self, addr: str) -> Optional[ScanResult]:
|
def process(self, addr: str) -> Optional[ScanResult]:
|
||||||
|
|
Loading…
Reference in a new issue