Commit 4d2b4caf authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos

Added a custom command to fetch networks for each peer

parent b63e673d
# -*- coding: utf-8 -*- vim:encoding=utf-8:
# vim: tabstop=4:shiftwidth=4:softtabstop=4:expandtab
from import BaseCommand, CommandError
from flowspy.peers.models import *
class Command(BaseCommand):
args = ''
help = 'Fetches networks for each peer in database'
def handle(self, *args, **options):
for p in Peer.objects.all():
self.stdout.write('Fetching networks for %s...' % p.peer_name.encode('utf8'))
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment