parameters: (link_guid)
docstring: 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.
docstring_summary: 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.
docstring_tokens: 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 .
function: 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'])
function_tokens: 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' ] )