Adding async await where possible, need to revist system tasks

This commit is contained in:
James Barnsley
2019-12-30 21:13:15 +13:00
parent 6d72047106
commit d522316ee2
4 changed files with 51 additions and 24 deletions

View File

@ -522,11 +522,11 @@ class IrisCore(pykka.ThreadingActor):
# Run a mopidy local scan
# Essetially an alias to "mopidyctl local scan"
##
def local_scan(self, *args, **kwargs):
async def local_scan(self, *args, **kwargs):
callback = kwargs.get('callback', False)
# Trigger the action
IrisSystemThread('local_scan', self.local_scan_callback).start()
await IrisSystemThread('local_scan', self.local_scan_callback).start()
self.broadcast(data={
'method': "local_scan_started"