(link_guid)
One-time task, to populate the warc_size field for links where we missed it, the first time around.
    See https://github.com/harvard-lil/perma/issues/2617 and https://github.com/harvard-lil/perma/issues/2172;
    old links also often lack this metadata.
One-time task, to populate the warc_size field for links where we missed it, the first time around.
    See https://github.com/harvard-lil/perma/issues/2617 and https://github.com/harvard-lil/perma/issues/2172;
    old links also often lack this metadata.
One - time task to populate the warc_size field for links where we missed it the first time around . See https : // github . com / harvard - lil / perma / issues / 2617 and https : // github . com / harvard - lil / perma / issues / 2172 ; old links also often lack this metadata .
def populate_warc_size(link_guid):
    """
    One-time task, to populate the warc_size field for links where we missed it, the first time around.
    See https://github.com/harvard-lil/perma/issues/2617 and https://github.com/harvard-lil/perma/issues/2172;
    old links also often lack this metadata.
    """
    link = Link.objects.get(guid=link_guid)
    link.warc_size = default_storage.size(link.warc_storage_file())
    link.save(update_fields=['warc_size'])
def populate_warc_size ( link_guid ) : link = Link . objects . get ( guid = link_guid ) link . warc_size = default_storage . size ( link . warc_storage_file ( ) ) link . save ( update_fields = [ 'warc_size' ] )