add peering task
This commit is contained in:
parent
c517922fb9
commit
f6cfb255a6
2 changed files with 88 additions and 80 deletions
|
|
@ -22,7 +22,7 @@ class Tasks(Thread):
|
|||
|
||||
def run(self):
|
||||
import item.scan
|
||||
from user.models import List
|
||||
from user.models import export_list, update_user_peering
|
||||
while self.connected:
|
||||
m = self.q.get()
|
||||
if m:
|
||||
|
|
@ -33,9 +33,11 @@ class Tasks(Thread):
|
|||
elif action == 'import':
|
||||
item.scan.run_import(data)
|
||||
elif action == 'export':
|
||||
List.export(data)
|
||||
export_list(data)
|
||||
elif action == 'scan':
|
||||
item.scan.run_scan()
|
||||
elif action == 'peering':
|
||||
update_user_peering(*data)
|
||||
else:
|
||||
trigger_event('error', {'error': 'unknown action'})
|
||||
except:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue