Commit 8e1cf2ec authored by Stauros Kroustouris's avatar Stauros Kroustouris

update cron_fetch_networks

parent 2556b11b
from django.core.management import setup_environ
import settings
setup_environ(settings)
from django.core.mail import send_mail
from flowspy.peers.models import *
#!/usr/bin/env python
import os
import sys
def populate_networks():
peers = Peer.objects.all()
for peer in peers:
print peer
peer.fill_networks()
# if peer_networks > 0:
# send_mail('Peer networks added , 'noreply@grnet.gr', ['leopoul@noc.grnet.gr'])
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "flowspy.settings")
from django.core.mail import send_mail
from peers.models import *
populate_networks()
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