@cronjobs.register
def clean_old_signed(seconds=(60 * 60)):
 log.info('Removing old apps signed for reviewers')
 root = settings.SIGNED_APPS_REVIEWER_PATH
 now = (datetime.utcnow if storage_is_remote() else datetime.now)
 for (nextroot, dirs, files) in walk_storage(root, storage=private_storage):
  for fn in files:
   full = os.path.join(nextroot, fn)
   age = (now() - private_storage.modified_time(full))
   if (age.total_seconds() > seconds):
    log.debug(('Removing signed app: %s, %dsecs old.' % (full, age.total_seconds())))
    private_storage.delete(full)

@ cronjobs . register def clean_old_signed ( seconds = ( 60 * 60 ) ) : log . info ( 'Removing old apps signed for reviewers' ) root = settings . SIGNED_APPS_REVIEWER_PATH now = ( datetime . utcnow if storage_is_remote ( ) else datetime . now ) for ( nextroot , dirs , files ) in walk_storage ( root , storage = private_storage ) : for fn in files : full = os . path . join ( nextroot , fn ) age = ( now ( ) - private_storage . modified_time ( full ) ) if ( age . total_seconds ( ) > seconds ) : log . debug ( ( 'Removing signed app: %s, %dsecs old.' % ( full , age . total_seconds ( ) ) ) ) private_storage . delete ( full )
clean out apps signed for reviewers .