Commit 71605031 authored by juga's avatar juga
Browse files

Log when bwauths are being created

parent a4dc557d
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -128,6 +128,7 @@ def import_relaydescs(relaydescs_list, update=True):


def import_bwauths(dirauths, consensus=None, only_sbws=False):
    logger.info("Importing bwauths.")
    for a in dirauths:
        # logger.debug("bwauth nickname %s", a.nickname)
        if (
@@ -140,12 +141,14 @@ def import_bwauths(dirauths, consensus=None, only_sbws=False):
            continue
        logger.debug("Dirauth %s", a.nickname)
        try:
            bwauth, _ = BwAuth.objects.get_or_create(
            bwauth, created = BwAuth.objects.get_or_create(
                nickname=a.nickname,
                fingerprint=a.v3ident,
                ipv4=a.address,
                # contact=a.contact,
            )
            if created:
                logger.debug("Created %s bwauth.", bwauth)
        except IntegrityError:
            # logger.debug(e)
            bwauth = BwAuth.objects.get(fingerprint=a.v3ident)
@@ -232,7 +235,7 @@ def import_bwfile(bwfile_list, bwauth=None, only_sbws=True, update=True):

    for bw_file in bwfile_list:
        logger.info(
            "Bandwidth file %s %s",
            "Bandwidth file created_at: %s, software_version: %s",
            bw_file.created_at,
            bw_file.software_version,
        )