withhold_dns = cp.getboolean('unloader', 'withhold_dns') except ConfigParser.NoOptionError: withhold_dns = False include_vos = None exclude_vos = None try: include = cp.get('unloader', 'include_vos') include_vos = [vo.strip() for vo in include.split(',')] except ConfigParser.NoOptionError: # Only exclude VOs if we haven't specified the ones to include. try: exclude = cp.get('unloader', 'exclude_vos') exclude_vos = [vo.strip() for vo in exclude.split(',')] except ConfigParser.NoOptionError: pass unloader = DbUnloader(db, unload_dir, include_vos, exclude_vos, local_jobs, withhold_dns) try: msgs, recs = unloader.unload_latest(table_name, send_ur) log.info('%d records in %d messages unloaded from %s' % (recs, msgs, table_name)) except KeyError: log.error('Invalid table name: %s, omitting' % table_name) except ApelDbException, e: log.error('Unloading failed: %s' % e) log.info('Unloading complete.') log.info('=====================')