Beispiel #1
0
    def read_processor(self, value: Optional[ProxyProcessorType]) -> None:
        if value is None:
            self.__processors["read"] = self._blank_processor
            return

        self.__processors["read"] = aiomisc.awaitable(value)
Beispiel #2
0
 def write_processor(self, value: t.Optional[ProxyProcessorType]) -> None:
     if value is None:
         self.__processors["write"] = self._blank_processor
         return
     self.__processors["write"] = aiomisc.awaitable(value)
Beispiel #3
0
 def payload(func, *args, **kwargs):
     nonlocal entities
     func = partial(awaitable(func), *args, **kwargs)
     entities.append(func)