implement sharemetadata, fixes 165

This commit is contained in:
j 2016-01-19 15:35:16 +05:30
commit 7a42473919
11 changed files with 162 additions and 43 deletions

View file

@ -22,6 +22,7 @@ class Tasks(Thread):
def run(self):
import item.scan
from item.models import sync_metadata
from user.models import export_list, update_user_peering
while self.connected:
m = self.q.get()
@ -40,6 +41,10 @@ class Tasks(Thread):
item.scan.import_folder()
elif action == 'peering':
update_user_peering(*data)
elif action == 'syncmetadata':
if not data:
data = []
sync_metadata(*data)
else:
trigger_event('error', {'error': 'unknown action'})
except: