Mercurial > libervia-backend
comparison sat/plugins/plugin_misc_merge_requests.py @ 3715:b9718216a1c0 0.9
merge bookmark 0.9
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 01 Dec 2021 16:13:31 +0100 |
parents | 5f65f4e9f8cb |
children | a0666f17f300 |
comparison
equal
deleted
inserted
replaced
3714:af09b5aaa5d7 | 3715:b9718216a1c0 |
---|---|
75 self._t = self.host.plugins["LISTS"] | 75 self._t = self.host.plugins["LISTS"] |
76 self._handlers = {} | 76 self._handlers = {} |
77 self._handlers_list = [] # handlers sorted by priority | 77 self._handlers_list = [] # handlers sorted by priority |
78 self._type_handlers = {} # data type => handler map | 78 self._type_handlers = {} # data type => handler map |
79 host.bridge.addMethod("mergeRequestsGet", ".plugin", | 79 host.bridge.addMethod("mergeRequestsGet", ".plugin", |
80 in_sign='ssiassa{ss}s', out_sign='s', | 80 in_sign='ssiassss', out_sign='s', |
81 method=self._get, | 81 method=self._get, |
82 async_=True | 82 async_=True |
83 ) | 83 ) |
84 host.bridge.addMethod("mergeRequestSet", ".plugin", | 84 host.bridge.addMethod("mergeRequestSet", ".plugin", |
85 in_sign='ssssa{sas}ssss', out_sign='s', | 85 in_sign='ssssa{sas}ssss', out_sign='s', |
147 "metadata": metadata, | 147 "metadata": metadata, |
148 "items_patches": items_patches, | 148 "items_patches": items_patches, |
149 }) | 149 }) |
150 | 150 |
151 def _get(self, service='', node='', max_items=10, item_ids=None, sub_id=None, | 151 def _get(self, service='', node='', max_items=10, item_ids=None, sub_id=None, |
152 extra_dict=None, profile_key=C.PROF_KEY_NONE): | 152 extra="", profile_key=C.PROF_KEY_NONE): |
153 if extra_dict and 'parse' in extra_dict: | 153 extra = data_format.deserialise(extra) |
154 extra_dict['parse'] = C.bool(extra_dict['parse']) | |
155 client, service, node, max_items, extra, sub_id = self._s.prepareBridgeGet( | 154 client, service, node, max_items, extra, sub_id = self._s.prepareBridgeGet( |
156 service, node, max_items, sub_id, extra_dict, profile_key) | 155 service, node, max_items, sub_id, extra, profile_key) |
157 d = self.get(client, service, node or None, max_items, item_ids, sub_id or None, | 156 d = self.get(client, service, node or None, max_items, item_ids, sub_id or None, |
158 extra.rsm_request, extra.extra) | 157 extra.rsm_request, extra.extra) |
159 d.addCallback(self.serialise) | 158 d.addCallback(self.serialise) |
160 return d | 159 return d |
161 | 160 |