Statistics
| Branch: | Tag: | Revision:

root / cron_fetch_networks.py @ d60db93b

History | View | Annotate | Download (443 Bytes)

1
from django.core.management import setup_environ  
2
import settings
3
setup_environ(settings)
4
from django.core.mail import send_mail
5
from flowspy.peers.models import *
6

    
7

    
8
def populate_networks():
9
    peers = Peer.objects.all()
10
    for peer in peers:
11
        peer.fill_networks()
12
#    if peer_networks > 0:
13
#        send_mail('Peer networks added , 'noreply@grnet.gr', ['leopoul@noc.grnet.gr'])
14

    
15

    
16
if __name__ == "__main__":
17
    populate_networks()