comparison src/pages/tickets/view/page_meta.py @ 1098:01e95ec9df9e

server, pages: fixed blocking calls to bridge by using bridgeCall instead
author Goffi <goffi@goffi.org>
date Fri, 01 Jun 2018 15:09:19 +0200
parents 7d5633ccbaf2
children cdd389ef97bc
comparison
equal deleted inserted replaced
1097:f134c0ecb1d5 1098:01e95ec9df9e
38 profile = self.getProfile(request) 38 profile = self.getProfile(request)
39 39
40 if profile is None: 40 if profile is None:
41 profile = C.SERVICE_PROFILE 41 profile = C.SERVICE_PROFILE
42 42
43 tickets = yield self.host.bridge.ticketsGet(service.full() if service else u'', node, C.NO_LIMIT, [ticket_id], '', {'labels_as_list': C.BOOL_TRUE}, profile) 43 tickets = yield self.host.bridgeCall("ticketsGet", service.full() if service else u'', node, C.NO_LIMIT, [ticket_id], '', {'labels_as_list': C.BOOL_TRUE}, profile)
44 ticket = [template_xmlui.create(self.host, x) for x in tickets[0]][0] 44 ticket = [template_xmlui.create(self.host, x) for x in tickets[0]][0]
45 template_data[u'item'] = ticket 45 template_data[u'item'] = ticket
46 comments_uri = ticket.widgets['comments_uri'].value 46 comments_uri = ticket.widgets['comments_uri'].value
47 if comments_uri: 47 if comments_uri:
48 uri_data = uri.parseXMPPUri(comments_uri) 48 uri_data = uri.parseXMPPUri(comments_uri)
49 template_data['comments_node'] = comments_node = uri_data['node'] 49 template_data['comments_node'] = comments_node = uri_data['node']
50 template_data['comments_service'] = comments_service = uri_data['path'] 50 template_data['comments_service'] = comments_service = uri_data['path']
51 comments = yield self.host.bridge.mbGet(comments_service, 51 comments = yield self.host.bridgeCall("mbGet", comments_service,
52 comments_node, 52 comments_node,
53 C.NO_LIMIT, 53 C.NO_LIMIT,
54 [], 54 [],
55 {}, 55 {},
56 profile) 56 profile)
57 57
58 template_data[u'comments'] = data_objects.BlogItems(comments) 58 template_data[u'comments'] = data_objects.BlogItems(comments)
59 template_data[u'login_url'] = self.getPageRedirectURL(request) 59 template_data[u'login_url'] = self.getPageRedirectURL(request)
60 60
61 if session.connected: 61 if session.connected: