make matcher running concurrently and add to me checking

This commit is contained in:
yanyongyu
2020-08-21 14:24:32 +08:00
parent c01d3c7ca1
commit c1d0eae34b
6 changed files with 220 additions and 42 deletions

View File

@ -26,6 +26,7 @@ class Matcher:
temp: bool = False
expire_time: Optional[datetime] = None
priority: int = 1
block: bool = False
_default_state: dict = {}
@ -45,6 +46,7 @@ class Matcher:
handlers: list = [],
temp: bool = False,
priority: int = 1,
block: bool = False,
*,
default_state: dict = {},
expire_time: Optional[datetime] = None) -> Type["Matcher"]:
@ -63,6 +65,7 @@ class Matcher:
"temp": temp,
"expire_time": expire_time,
"priority": priority,
"block": block,
"_default_state": default_state
})