comparison sat_frontends/jp/cmd_pubsub.py @ 3600:1709f0a78f50

jp (base): add flag for `use_pubsub` to add cache skipping option
author Goffi <goffi@goffi.org>
date Thu, 29 Jul 2021 22:51:01 +0200
parents 5f65f4e9f8cb
children b46e9791168f
comparison
equal deleted inserted replaced
3599:ab1fe6b25631 3600:1709f0a78f50
821 self, 821 self,
822 host, 822 host,
823 "get", 823 "get",
824 use_output=C.OUTPUT_LIST_XML, 824 use_output=C.OUTPUT_LIST_XML,
825 use_pubsub=True, 825 use_pubsub=True,
826 pubsub_flags={C.NODE, C.MULTI_ITEMS}, 826 pubsub_flags={C.NODE, C.MULTI_ITEMS, C.CACHE},
827 help=_("get pubsub item(s)"), 827 help=_("get pubsub item(s)"),
828 ) 828 )
829 829
830 def add_parser_options(self): 830 def add_parser_options(self):
831 self.parser.add_argument( 831 self.parser.add_argument(
833 "--sub-id", 833 "--sub-id",
834 default="", 834 default="",
835 help=_("subscription id"), 835 help=_("subscription id"),
836 ) 836 )
837 #  TODO: a key(s) argument to select keys to display 837 #  TODO: a key(s) argument to select keys to display
838 # TODO: add MAM filters
839 838
840 async def start(self): 839 async def start(self):
841 try: 840 try:
842 ps_result = data_format.deserialise( 841 ps_result = data_format.deserialise(
843 await self.host.bridge.psItemsGet( 842 await self.host.bridge.psItemsGet(