update all parts concurrently

This commit is contained in:
Tomáš Mládek 2020-09-15 20:54:08 +02:00
parent 357e016a11
commit 50f54d1d6d

View file

@ -33,11 +33,15 @@ class IndexView(TemplateView):
}
async def process_all(self, links, services, machines, feeds):
links, services, machines, feeds = await asyncio.gather(
self.process_links(links), self.process_services(services),
self.process_machines(machines), self.process_feeds(feeds))
return {
'links': await self.process_links(links),
'services': await self.process_services(services),
'machines': await self.process_machines(machines),
'feed_items': await self.process_feeds(feeds),
'links': links,
'services': services,
'machines': machines,
'feed_items': feeds,
}
async def process_links(self, links):