<s> """<STR_LIT>""" <EOL> from modularodm import Q <EOL> import logging <EOL> import sys <EOL> from website . addons . osfstorage . model import OsfStorageFileVersion <EOL> from website . app import init_app <EOL> from scripts import utils as scripts_utils <EOL> logger = logging . getLogger ( __name__ ) <EOL> def main ( ) : <EOL> for each in OsfStorageFileVersion . find ( <EOL> Q ( '<STR_LIT:size>' , '<STR_LIT>' , None ) & <EOL> Q ( '<STR_LIT:status>' , '<STR_LIT>' , '<STR_LIT>' ) & <EOL> Q ( '<STR_LIT>' , '<STR_LIT>' , True ) <EOL> ) : <EOL> logger . info ( '<STR_LIT>' . format ( each . _id ) ) <EOL> if '<STR_LIT>' not in sys . argv : <EOL> each . update_metadata ( each . metadata ) <EOL> each . save ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> init_app ( set_backends = True , routes = False ) <EOL> if '<STR_LIT>' not in sys . argv : <EOL> scripts_utils . add_file_logger ( logger , __file__ ) <EOL> main ( ) </s>
