mirror of
https://github.com/quantum5/peeringdb-mirror.git
synced 2025-04-24 10:11:58 -04:00
14 lines
399 B
Python
14 lines
399 B
Python
from django.conf import settings
|
|
from django.core.management.base import BaseCommand
|
|
from peeringdb import resource
|
|
|
|
from peeringdb_api.pdb_client import client
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = 'Syncs the PeeringDB database.'
|
|
|
|
def handle(self, *args, **options):
|
|
rs = resource.all_resources()
|
|
client.updater.update_all(rs, fetch_private=bool(settings.PEERINGDB_API_KEY))
|